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

Side by Side Diff: content/browser/renderer_host/render_widget_host_delegate.h

Issue 2122023002: Cross-process frames should be notified of device scale factor changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Version of patch without second test. Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_DELEGATE_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_DELEGATE_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_DELEGATE_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_DELEGATE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <vector> 10 #include <vector>
11 11
12 #include "build/build_config.h" 12 #include "build/build_config.h"
13 #include "content/common/content_export.h" 13 #include "content/common/content_export.h"
14 #include "third_party/WebKit/public/platform/WebDisplayMode.h" 14 #include "third_party/WebKit/public/platform/WebDisplayMode.h"
15 #include "third_party/WebKit/public/web/WebInputEvent.h" 15 #include "third_party/WebKit/public/web/WebInputEvent.h"
16 #include "ui/gfx/native_widget_types.h" 16 #include "ui/gfx/native_widget_types.h"
17 17
18 namespace blink { 18 namespace blink {
19 class WebMouseWheelEvent; 19 class WebMouseWheelEvent;
20 class WebGestureEvent; 20 class WebGestureEvent;
21 struct WebScreenInfo;
21 } 22 }
22 23
23 namespace gfx { 24 namespace gfx {
24 class Point; 25 class Point;
25 class Rect; 26 class Rect;
26 class Size; 27 class Size;
27 } 28 }
28 29
29 namespace content { 30 namespace content {
30 31
(...skipping 23 matching lines...) Expand all
54 virtual void RenderWidgetWasResized(RenderWidgetHostImpl* render_widget_host, 55 virtual void RenderWidgetWasResized(RenderWidgetHostImpl* render_widget_host,
55 bool width_changed) {} 56 bool width_changed) {}
56 57
57 // The contents auto-resized and the container should match it. 58 // The contents auto-resized and the container should match it.
58 virtual void ResizeDueToAutoResize(RenderWidgetHostImpl* render_widget_host, 59 virtual void ResizeDueToAutoResize(RenderWidgetHostImpl* render_widget_host,
59 const gfx::Size& new_size) {} 60 const gfx::Size& new_size) {}
60 61
61 // The screen info has changed. 62 // The screen info has changed.
62 virtual void ScreenInfoChanged() {} 63 virtual void ScreenInfoChanged() {}
63 64
65 // Sets the device scale factor for frames associated with this WebContents.
66 virtual void UpdateDeviceScaleFactor(double device_scale_factor) {}
67
68 // Retrieve screen information.
69 virtual void GetScreenInfo(blink::WebScreenInfo* web_screen_info);
70
64 // Callback to give the browser a chance to handle the specified keyboard 71 // Callback to give the browser a chance to handle the specified keyboard
65 // event before sending it to the renderer. 72 // event before sending it to the renderer.
66 // Returns true if the |event| was handled. Otherwise, if the |event| would 73 // Returns true if the |event| was handled. Otherwise, if the |event| would
67 // be handled in HandleKeyboardEvent() method as a normal keyboard shortcut, 74 // be handled in HandleKeyboardEvent() method as a normal keyboard shortcut,
68 // |*is_keyboard_shortcut| should be set to true. 75 // |*is_keyboard_shortcut| should be set to true.
69 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, 76 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event,
70 bool* is_keyboard_shortcut); 77 bool* is_keyboard_shortcut);
71 78
72 // Callback to inform the browser that the renderer did not process the 79 // Callback to inform the browser that the renderer did not process the
73 // specified events. This gives an opportunity to the browser to process the 80 // specified events. This gives an opportunity to the browser to process the
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 // this RenderWidgetHost. 222 // this RenderWidgetHost.
216 virtual bool IsHidden(); 223 virtual bool IsHidden();
217 224
218 protected: 225 protected:
219 virtual ~RenderWidgetHostDelegate() {} 226 virtual ~RenderWidgetHostDelegate() {}
220 }; 227 };
221 228
222 } // namespace content 229 } // namespace content
223 230
224 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_DELEGATE_H_ 231 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698