summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/platform/widget/frame_widget.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/blink/renderer/platform/widget/frame_widget.h')
-rw-r--r--chromium/third_party/blink/renderer/platform/widget/frame_widget.h49
1 files changed, 37 insertions, 12 deletions
diff --git a/chromium/third_party/blink/renderer/platform/widget/frame_widget.h b/chromium/third_party/blink/renderer/platform/widget/frame_widget.h
index d854f641622..914d2847bd2 100644
--- a/chromium/third_party/blink/renderer/platform/widget/frame_widget.h
+++ b/chromium/third_party/blink/renderer/platform/widget/frame_widget.h
@@ -5,25 +5,37 @@
#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_WIDGET_FRAME_WIDGET_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_WIDGET_FRAME_WIDGET_H_
+#include "cc/input/layer_selection_bound.h"
#include "mojo/public/mojom/base/text_direction.mojom-blink.h"
+#include "services/viz/public/mojom/compositing/delegated_ink_metadata.mojom-blink.h"
+#include "services/viz/public/mojom/compositing/frame_sink_id.mojom-blink.h"
#include "third_party/blink/public/mojom/input/input_handler.mojom-blink.h"
#include "third_party/blink/public/mojom/manifest/display_mode.mojom-blink.h"
#include "third_party/blink/public/platform/web_text_input_info.h"
#include "third_party/blink/public/platform/web_text_input_type.h"
#include "third_party/blink/public/platform/web_vector.h"
#include "third_party/blink/public/web/web_swap_result.h"
-#include "third_party/blink/public/web/web_widget_client.h"
#include "third_party/blink/renderer/platform/platform_export.h"
#include "ui/base/ime/mojom/text_input_state.mojom-blink.h"
#include "ui/base/ime/mojom/virtual_keyboard_types.mojom-blink.h"
namespace cc {
class AnimationHost;
+enum class EventListenerClass;
+enum class EventListenerProperties;
class Layer;
+class LayerTreeSettings;
+class LayerTreeDebugState;
class PaintImage;
+struct ElementId;
} // namespace cc
+namespace ui {
+class Cursor;
+} // namespace ui
+
namespace blink {
+struct ScreenInfo;
// In interface exposed within Blink from local root frames that provides
// local-root specific things related to compositing and input. This
@@ -31,13 +43,9 @@ namespace blink {
// on this class occur on the main thread. input/FrameWidgetInputHandlerImpl
// which also implements the FrameWidgetInputHandler interface runs on the
// compositor thread and proxies calls to this class.
-class PLATFORM_EXPORT FrameWidget
- : public mojom::blink::FrameWidgetInputHandler {
+class PLATFORM_EXPORT FrameWidget {
public:
- ~FrameWidget() override;
-
- // Returns the WebWidgetClient, which is implemented outside of blink.
- virtual WebWidgetClient* Client() const = 0;
+ virtual ~FrameWidget();
// Returns the compositors's AnimationHost for the widget.
virtual cc::AnimationHost* AnimationHost() const = 0;
@@ -47,8 +55,8 @@ class PLATFORM_EXPORT FrameWidget
virtual void SetOverscrollBehavior(
const cc::OverscrollBehavior& overscroll_behavior) = 0;
- // Posts a task with the given delay, then calls ScheduleAnimation() on the
- // Client().
+ // Posts a task with the given delay, then requests an animation frame from
+ // the compositor (ie LayerTreeHost::SetNeedsAnimate()).
virtual void RequestAnimationAfterDelay(const base::TimeDelta&) = 0;
// Sets the root layer. The |layer| can be null when detaching the root layer.
@@ -66,8 +74,7 @@ class PLATFORM_EXPORT FrameWidget
// The |callback| will be fired when the corresponding renderer frame is
// submitted (still called "swapped") to the display compositor (either with
// DidSwap or DidNotSwap).
- virtual void NotifySwapAndPresentationTimeInBlink(
- WebReportTimeCallback swap_callback,
+ virtual void NotifyPresentationTimeInBlink(
WebReportTimeCallback presentation_callback) = 0;
// Enable or disable BeginMainFrameNotExpected signals from the compositor,
@@ -78,6 +85,15 @@ class PLATFORM_EXPORT FrameWidget
// purposes.
virtual int GetLayerTreeId() = 0;
+ // Return the LayerTreeSettings from the compositor. These are constant from
+ // the time the compositor is created.
+ virtual const cc::LayerTreeSettings& GetLayerTreeSettings() = 0;
+
+ // Sets the state of the browser controls. (Used for URL bar animations.)
+ virtual void UpdateBrowserControlsState(cc::BrowserControlsState constraints,
+ cc::BrowserControlsState current,
+ bool animate) = 0;
+
// Set or get what event handlers exist in the document contained in the
// WebWidget in order to inform the compositor thread if it is able to handle
// an input event, or it needs to pass it to the main thread to be handled.
@@ -110,7 +126,7 @@ class PLATFORM_EXPORT FrameWidget
// ScrollableArea identified by |scrollable_area_element_id| by the given
// delta + granularity.
virtual void InjectGestureScrollEvent(
- WebGestureDevice device,
+ mojom::blink::GestureDevice device,
const gfx::Vector2dF& delta,
ui::ScrollGranularity granularity,
cc::ElementId scrollable_area_element_id,
@@ -240,6 +256,15 @@ class PLATFORM_EXPORT FrameWidget
// Returns the FrameSinkId for this widget which is used for identifying
// frames submitted from the compositor.
virtual const viz::FrameSinkId& GetFrameSinkId() = 0;
+
+ // Returns the raster scale factor for the local root frame associated with
+ // this widget, taking into account its transform to main frame space.
+ virtual float GetCompositingScaleFactor() = 0;
+
+ // Get and set the configuration for the debugging overlay managed by the
+ // underlaying LayerTreeHost.
+ virtual const cc::LayerTreeDebugState& GetLayerTreeDebugState() = 0;
+ virtual void SetLayerTreeDebugState(const cc::LayerTreeDebugState& state) = 0;
};
} // namespace blink