Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Unified Diff: content/browser/renderer_host/render_widget_host_view_mac.h

Issue 341983008: Listen to Display reconfiguration and notify DisplayObservers on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mac_display
Patch Set: review comments + tests Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_widget_host_view_mac.h
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.h b/content/browser/renderer_host/render_widget_host_view_mac.h
index 74f0c0b0c7e996260cad79e822e30c62b9f4a053..020a97784b8b73b158fbe26f3d2f146af1829cb3 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.h
+++ b/content/browser/renderer_host/render_widget_host_view_mac.h
@@ -31,6 +31,7 @@
#include "third_party/WebKit/public/web/WebCompositionUnderline.h"
#include "ui/base/cocoa/base_view.h"
#include "ui/base/cocoa/remote_layer_api.h"
+#include "ui/gfx/display_observer.h"
struct ViewHostMsg_TextInputState_Params;
@@ -219,7 +220,8 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
public BrowserCompositorViewMacClient,
public IPC::Sender,
public SoftwareFrameManagerClient,
- public CompositingIOSurfaceLayerClient {
+ public CompositingIOSurfaceLayerClient,
+ public gfx::DisplayObserver {
public:
// The view will associate itself with the given widget. The native view must
// be hooked up immediately to the view hierarchy, or else when it is
@@ -349,6 +351,12 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
// CompositingIOSurfaceLayerClient implementation.
virtual void AcceleratedLayerDidDrawFrame(bool succeeded) OVERRIDE;
+ // gfx::DisplayObserver implementation.
+ virtual void OnDisplayAdded(const gfx::Display& new_display) OVERRIDE;
+ virtual void OnDisplayRemoved(const gfx::Display& old_display) OVERRIDE;
+ virtual void OnDisplayMetricsChanged(const gfx::Display& display,
+ uint32_t metrics) OVERRIDE;
+
// Forwards the mouse event to the renderer.
void ForwardMouseEvent(const blink::WebMouseEvent& event);
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_view_mac.mm » ('j') | ui/gfx/display_change_notifier.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698