diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-08-24 12:15:48 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-08-28 13:30:04 +0000 |
commit | b014812705fc80bff0a5c120dfcef88f349816dc (patch) | |
tree | 25a2e2d9fa285f1add86aa333389a839f81a39ae /chromium/content/public/browser/render_widget_host_view.h | |
parent | 9f4560b1027ae06fdb497023cdcaf91b8511fa74 (diff) | |
download | qtwebengine-chromium-b014812705fc80bff0a5c120dfcef88f349816dc.tar.gz |
BASELINE: Update Chromium to 68.0.3440.125
Change-Id: I23f19369e01f688e496f5bf179abb521ad73874f
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/content/public/browser/render_widget_host_view.h')
-rw-r--r-- | chromium/content/public/browser/render_widget_host_view.h | 38 |
1 files changed, 21 insertions, 17 deletions
diff --git a/chromium/content/public/browser/render_widget_host_view.h b/chromium/content/public/browser/render_widget_host_view.h index 1ced1c489b4..0f2bbdcf4b2 100644 --- a/chromium/content/public/browser/render_widget_host_view.h +++ b/chromium/content/public/browser/render_widget_host_view.h @@ -5,6 +5,7 @@ #ifndef CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ #define CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ +#include "base/containers/flat_map.h" #include "base/containers/flat_set.h" #include "base/optional.h" #include "base/strings/string16.h" @@ -22,20 +23,13 @@ class Rect; class Size; } -namespace mojo { -template <class T> -class InterfacePtr; -} - namespace ui { +enum class DomCode; class TextInputClient; } namespace viz { -namespace mojom { -class FrameSinkVideoCapturer; -using FrameSinkVideoCapturerPtr = mojo::InterfacePtr<FrameSinkVideoCapturer>; -} // namespace mojom +class ClientFrameSinkVideoCapturer; } // namespace viz namespace content { @@ -157,11 +151,11 @@ class CONTENT_EXPORT RenderWidgetHostView { // has to be either SK_ColorTRANSPARENT or opaque. If set to // SK_ColorTRANSPARENT, the renderer's background color will be overridden to // be fully transparent. + // SetBackgroundColor is called to set the default color of the view, + // which is shown if the background color of the renderer is not available. virtual void SetBackgroundColor(SkColor color) = 0; - virtual SkColor background_color() const = 0; - // Convenience method to fill the background layer with the default color by - // calling |SetBackgroundColor|. - virtual void SetBackgroundColorToDefault() = 0; + // GetBackgroundColor returns the current background color of the view. + virtual base::Optional<SkColor> GetBackgroundColor() const = 0; // Return value indicates whether the mouse is locked successfully or not. virtual bool LockMouse() = 0; @@ -170,11 +164,17 @@ class CONTENT_EXPORT RenderWidgetHostView { virtual bool IsMouseLocked() = 0; // Start/Stop intercepting future system keyboard events. - virtual bool LockKeyboard(base::Optional<base::flat_set<int>> keys) = 0; + virtual bool LockKeyboard( + base::Optional<base::flat_set<ui::DomCode>> dom_codes) = 0; virtual void UnlockKeyboard() = 0; // Returns true if keyboard lock is active. virtual bool IsKeyboardLocked() = 0; + // Return a mapping dictionary from keyboard code to key values for the + // highest-priority ASCII-capable layout in the list of currently installed + // keyboard layouts. + virtual base::flat_map<std::string, std::string> GetKeyboardLayoutMap() = 0; + // Retrives the size of the viewport for the visible region. May be smaller // than the view size if a portion of the view is obstructed (e.g. by a // virtual keyboard). @@ -184,8 +184,7 @@ class CONTENT_EXPORT RenderWidgetHostView { // visible viewport. virtual void SetInsets(const gfx::Insets& insets) = 0; - // Returns true if the current display surface is available, a prerequisite - // for CopyFromSurface() to succeed. + // Returns true if the current display surface is available. virtual bool IsSurfaceAvailableForCopy() const = 0; // Copies the given subset of the view's surface, optionally scales it, and @@ -214,11 +213,16 @@ class CONTENT_EXPORT RenderWidgetHostView { const gfx::Size& output_size, base::OnceCallback<void(const SkBitmap&)> callback) = 0; + // Ensures that all surfaces are synchronized for the next call to + // CopyFromSurface. This is used by LayoutTests. + virtual void EnsureSurfaceSynchronizedForLayoutTest() = 0; + // Creates a video capturer, which will allow the caller to receive a stream // of media::VideoFrames captured from this view. The capturer is configured // to target this view, so there is no need to call ChangeTarget() before // Start(). See viz.mojom.FrameSinkVideoCapturer for documentation. - virtual viz::mojom::FrameSinkVideoCapturerPtr CreateVideoCapturer() = 0; + virtual std::unique_ptr<viz::ClientFrameSinkVideoCapturer> + CreateVideoCapturer() = 0; // Notification that a node was touched. // The |editable| parameter indicates if the node is editable, for e.g. |