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_RENDERER_RENDER_WIDGET_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_WIDGET_H_ |
6 #define CONTENT_RENDERER_RENDER_WIDGET_H_ | 6 #define CONTENT_RENDERER_RENDER_WIDGET_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 14 matching lines...) Expand all Loading... |
25 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextInputInfo.h" | 25 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextInputInfo.h" |
26 #include "third_party/WebKit/Source/WebKit/chromium/public/WebWidgetClient.h" | 26 #include "third_party/WebKit/Source/WebKit/chromium/public/WebWidgetClient.h" |
27 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h" | 27 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h" |
28 #include "third_party/skia/include/core/SkBitmap.h" | 28 #include "third_party/skia/include/core/SkBitmap.h" |
29 #include "ui/base/ime/text_input_type.h" | 29 #include "ui/base/ime/text_input_type.h" |
30 #include "ui/base/range/range.h" | 30 #include "ui/base/range/range.h" |
31 #include "ui/gfx/native_widget_types.h" | 31 #include "ui/gfx/native_widget_types.h" |
32 #include "ui/gfx/rect.h" | 32 #include "ui/gfx/rect.h" |
33 #include "ui/gfx/vector2d.h" | 33 #include "ui/gfx/vector2d.h" |
34 #include "ui/surface/transport_dib.h" | 34 #include "ui/surface/transport_dib.h" |
| 35 #include "webkit/compositor_bindings/web_layer_tree_view_impl.h" |
35 #include "webkit/glue/webcursor.h" | 36 #include "webkit/glue/webcursor.h" |
36 | 37 |
37 struct ViewHostMsg_UpdateRect_Params; | 38 struct ViewHostMsg_UpdateRect_Params; |
38 class ViewHostMsg_UpdateRect; | 39 class ViewHostMsg_UpdateRect; |
39 | 40 |
40 namespace IPC { | 41 namespace IPC { |
41 class SyncMessage; | 42 class SyncMessage; |
42 } | 43 } |
43 | 44 |
44 namespace WebKit { | 45 namespace WebKit { |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 virtual bool Send(IPC::Message* msg) OVERRIDE; | 115 virtual bool Send(IPC::Message* msg) OVERRIDE; |
115 | 116 |
116 // WebKit::WebWidgetClient | 117 // WebKit::WebWidgetClient |
117 virtual void willBeginCompositorFrame(); | 118 virtual void willBeginCompositorFrame(); |
118 virtual void didInvalidateRect(const WebKit::WebRect&); | 119 virtual void didInvalidateRect(const WebKit::WebRect&); |
119 virtual void didScrollRect(int dx, int dy, | 120 virtual void didScrollRect(int dx, int dy, |
120 const WebKit::WebRect& clipRect); | 121 const WebKit::WebRect& clipRect); |
121 virtual void didAutoResize(const WebKit::WebSize& new_size); | 122 virtual void didAutoResize(const WebKit::WebSize& new_size); |
122 virtual void didActivateCompositor(int input_handler_identifier); | 123 virtual void didActivateCompositor(int input_handler_identifier); |
123 virtual void didDeactivateCompositor(); | 124 virtual void didDeactivateCompositor(); |
| 125 virtual void initializeLayerTreeView( |
| 126 WebKit::WebLayerTreeViewClient* client, |
| 127 const WebKit::WebLayer& root_layer, |
| 128 const WebKit::WebLayerTreeView::Settings& settings); |
| 129 virtual WebKit::WebLayerTreeView* layerTreeView(); |
124 virtual void didBecomeReadyForAdditionalInput(); | 130 virtual void didBecomeReadyForAdditionalInput(); |
125 virtual void didCommitAndDrawCompositorFrame(); | 131 virtual void didCommitAndDrawCompositorFrame(); |
126 virtual void didCompleteSwapBuffers(); | 132 virtual void didCompleteSwapBuffers(); |
127 virtual void scheduleComposite(); | 133 virtual void scheduleComposite(); |
128 virtual void scheduleAnimation(); | 134 virtual void scheduleAnimation(); |
129 virtual void didFocus(); | 135 virtual void didFocus(); |
130 virtual void didBlur(); | 136 virtual void didBlur(); |
131 virtual void didChangeCursor(const WebKit::WebCursorInfo&); | 137 virtual void didChangeCursor(const WebKit::WebCursorInfo&); |
132 virtual void closeWidgetSoon(); | 138 virtual void closeWidgetSoon(); |
133 virtual void show(WebKit::WebNavigationPolicy); | 139 virtual void show(WebKit::WebNavigationPolicy); |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
443 | 449 |
444 // Routing ID that allows us to communicate to the parent browser process | 450 // Routing ID that allows us to communicate to the parent browser process |
445 // RenderWidgetHost. When MSG_ROUTING_NONE, no messages may be sent. | 451 // RenderWidgetHost. When MSG_ROUTING_NONE, no messages may be sent. |
446 int32 routing_id_; | 452 int32 routing_id_; |
447 | 453 |
448 int32 surface_id_; | 454 int32 surface_id_; |
449 | 455 |
450 // We are responsible for destroying this object via its Close method. | 456 // We are responsible for destroying this object via its Close method. |
451 WebKit::WebWidget* webwidget_; | 457 WebKit::WebWidget* webwidget_; |
452 | 458 |
| 459 // This is lazily constructed and must not outlive webwidget_. |
| 460 scoped_ptr<WebKit::WebLayerTreeViewImpl> web_layer_tree_view_; |
| 461 |
453 // Set to the ID of the view that initiated creating this view, if any. When | 462 // Set to the ID of the view that initiated creating this view, if any. When |
454 // the view was initiated by the browser (the common case), this will be | 463 // the view was initiated by the browser (the common case), this will be |
455 // MSG_ROUTING_NONE. This is used in determining ownership when opening | 464 // MSG_ROUTING_NONE. This is used in determining ownership when opening |
456 // child tabs. See RenderWidget::createWebViewWithRequest. | 465 // child tabs. See RenderWidget::createWebViewWithRequest. |
457 // | 466 // |
458 // This ID may refer to an invalid view if that view is closed before this | 467 // This ID may refer to an invalid view if that view is closed before this |
459 // view is. | 468 // view is. |
460 int32 opener_id_; | 469 int32 opener_id_; |
461 | 470 |
462 // The position where this view should be initially shown. | 471 // The position where this view should be initially shown. |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
628 | 637 |
629 // Specified whether the compositor will run in its own thread. | 638 // Specified whether the compositor will run in its own thread. |
630 bool is_threaded_compositing_enabled_; | 639 bool is_threaded_compositing_enabled_; |
631 | 640 |
632 DISALLOW_COPY_AND_ASSIGN(RenderWidget); | 641 DISALLOW_COPY_AND_ASSIGN(RenderWidget); |
633 }; | 642 }; |
634 | 643 |
635 } // namespace content | 644 } // namespace content |
636 | 645 |
637 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ | 646 #endif // CONTENT_RENDERER_RENDER_WIDGET_H_ |
OLD | NEW |