OLD | NEW |
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_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ |
6 #define CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ | 6 #define CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
10 #include "content/public/browser/native_web_keyboard_event.h" | 10 #include "content/public/browser/native_web_keyboard_event.h" |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 const KeyPressEventCallback& callback) = 0; | 242 const KeyPressEventCallback& callback) = 0; |
243 | 243 |
244 // Add/remove a callback that can handle all kinds of mouse events. | 244 // Add/remove a callback that can handle all kinds of mouse events. |
245 typedef base::Callback<bool(const blink::WebMouseEvent&)> MouseEventCallback; | 245 typedef base::Callback<bool(const blink::WebMouseEvent&)> MouseEventCallback; |
246 virtual void AddMouseEventCallback(const MouseEventCallback& callback) = 0; | 246 virtual void AddMouseEventCallback(const MouseEventCallback& callback) = 0; |
247 virtual void RemoveMouseEventCallback(const MouseEventCallback& callback) = 0; | 247 virtual void RemoveMouseEventCallback(const MouseEventCallback& callback) = 0; |
248 | 248 |
249 // Get the screen info corresponding to this render widget. | 249 // Get the screen info corresponding to this render widget. |
250 virtual void GetWebScreenInfo(blink::WebScreenInfo* result) = 0; | 250 virtual void GetWebScreenInfo(blink::WebScreenInfo* result) = 0; |
251 | 251 |
252 virtual SkColorType PreferredReadbackFormat() = 0; | |
253 | |
254 protected: | 252 protected: |
255 friend class RenderWidgetHostImpl; | 253 friend class RenderWidgetHostImpl; |
256 | 254 |
257 // Retrieves the implementation class. Intended only for code | 255 // Retrieves the implementation class. Intended only for code |
258 // within content/. This method is necessary because | 256 // within content/. This method is necessary because |
259 // RenderWidgetHost is the root of a diamond inheritance pattern, so | 257 // RenderWidgetHost is the root of a diamond inheritance pattern, so |
260 // subclasses inherit it virtually, which removes our ability to | 258 // subclasses inherit it virtually, which removes our ability to |
261 // static_cast to the subclass. | 259 // static_cast to the subclass. |
262 virtual RenderWidgetHostImpl* AsRenderWidgetHostImpl() = 0; | 260 virtual RenderWidgetHostImpl* AsRenderWidgetHostImpl() = 0; |
263 }; | 261 }; |
264 | 262 |
265 } // namespace content | 263 } // namespace content |
266 | 264 |
267 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ | 265 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_H_ |
OLD | NEW |