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_VIEW_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
6 #define CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 6 #define CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 30 matching lines...) Expand all Loading... |
41 #include "content/renderer/render_frame_impl.h" | 41 #include "content/renderer/render_frame_impl.h" |
42 #include "content/renderer/render_widget.h" | 42 #include "content/renderer/render_widget.h" |
43 #include "content/renderer/stats_collection_observer.h" | 43 #include "content/renderer/stats_collection_observer.h" |
44 #include "ipc/ipc_platform_file.h" | 44 #include "ipc/ipc_platform_file.h" |
45 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" | 45 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" |
46 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h" | 46 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h" |
47 #include "third_party/WebKit/public/web/WebAXObject.h" | 47 #include "third_party/WebKit/public/web/WebAXObject.h" |
48 #include "third_party/WebKit/public/web/WebConsoleMessage.h" | 48 #include "third_party/WebKit/public/web/WebConsoleMessage.h" |
49 #include "third_party/WebKit/public/web/WebDataSource.h" | 49 #include "third_party/WebKit/public/web/WebDataSource.h" |
50 #include "third_party/WebKit/public/web/WebElement.h" | 50 #include "third_party/WebKit/public/web/WebElement.h" |
| 51 #include "third_party/WebKit/public/web/WebFrameWidget.h" |
51 #include "third_party/WebKit/public/web/WebHistoryItem.h" | 52 #include "third_party/WebKit/public/web/WebHistoryItem.h" |
52 #include "third_party/WebKit/public/web/WebIconURL.h" | 53 #include "third_party/WebKit/public/web/WebIconURL.h" |
53 #include "third_party/WebKit/public/web/WebInputEvent.h" | 54 #include "third_party/WebKit/public/web/WebInputEvent.h" |
54 #include "third_party/WebKit/public/web/WebNavigationType.h" | 55 #include "third_party/WebKit/public/web/WebNavigationType.h" |
55 #include "third_party/WebKit/public/web/WebNode.h" | 56 #include "third_party/WebKit/public/web/WebNode.h" |
56 #include "third_party/WebKit/public/web/WebSecurityOrigin.h" | 57 #include "third_party/WebKit/public/web/WebSecurityOrigin.h" |
57 #include "third_party/WebKit/public/web/WebViewClient.h" | 58 #include "third_party/WebKit/public/web/WebViewClient.h" |
58 #include "ui/base/window_open_disposition.h" | 59 #include "ui/base/window_open_disposition.h" |
59 #include "ui/gfx/geometry/rect.h" | 60 #include "ui/gfx/geometry/rect.h" |
60 #include "ui/gfx/geometry/rect_f.h" | 61 #include "ui/gfx/geometry/rect_f.h" |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 // as that is only for changes that aren't initiated by the client. | 233 // as that is only for changes that aren't initiated by the client. |
233 void SetZoomLevel(double zoom_level); | 234 void SetZoomLevel(double zoom_level); |
234 | 235 |
235 // Indicates whether this page has been focused by the browser. | 236 // Indicates whether this page has been focused by the browser. |
236 bool has_focus() const { return has_focus_; } | 237 bool has_focus() const { return has_focus_; } |
237 | 238 |
238 // Sets page-level focus in this view and notifies plugins and Blink's | 239 // Sets page-level focus in this view and notifies plugins and Blink's |
239 // FocusController. | 240 // FocusController. |
240 void SetFocus(bool enable); | 241 void SetFocus(bool enable); |
241 | 242 |
| 243 void AttachWebFrameWidget(blink::WebWidget* frame_widget); |
| 244 |
242 // Plugin-related functions -------------------------------------------------- | 245 // Plugin-related functions -------------------------------------------------- |
243 | 246 |
244 #if defined(ENABLE_PLUGINS) | 247 #if defined(ENABLE_PLUGINS) |
245 // Get/set the plugin which will be used as to handle document find requests. | 248 // Get/set the plugin which will be used as to handle document find requests. |
246 void set_plugin_find_handler(PepperPluginInstanceImpl* plugin) { | 249 void set_plugin_find_handler(PepperPluginInstanceImpl* plugin) { |
247 plugin_find_handler_ = plugin; | 250 plugin_find_handler_ = plugin; |
248 } | 251 } |
249 PepperPluginInstanceImpl* plugin_find_handler() { | 252 PepperPluginInstanceImpl* plugin_find_handler() { |
250 return plugin_find_handler_; | 253 return plugin_find_handler_; |
251 } | 254 } |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
442 bool animate) override; | 445 bool animate) override; |
443 #endif | 446 #endif |
444 bool uses_temporary_zoom_level() const { return uses_temporary_zoom_level_; } | 447 bool uses_temporary_zoom_level() const { return uses_temporary_zoom_level_; } |
445 | 448 |
446 // Please do not add your stuff randomly to the end here. If there is an | 449 // Please do not add your stuff randomly to the end here. If there is an |
447 // appropriate section, add it there. If not, there are some random functions | 450 // appropriate section, add it there. If not, there are some random functions |
448 // nearer to the top you can add it to. | 451 // nearer to the top you can add it to. |
449 | 452 |
450 protected: | 453 protected: |
451 // RenderWidget overrides: | 454 // RenderWidget overrides: |
| 455 void CloseForFrame() override; |
452 void Close() override; | 456 void Close() override; |
453 void OnResize(const ViewMsg_Resize_Params& params) override; | 457 void OnResize(const ViewMsg_Resize_Params& params) override; |
454 void DidInitiatePaint() override; | 458 void DidInitiatePaint() override; |
455 void DidFlushPaint() override; | 459 void DidFlushPaint() override; |
456 gfx::Vector2d GetScrollOffset() override; | 460 gfx::Vector2d GetScrollOffset() override; |
457 void DidHandleKeyEvent() override; | 461 void DidHandleKeyEvent() override; |
458 bool WillHandleMouseEvent(const blink::WebMouseEvent& event) override; | 462 bool WillHandleMouseEvent(const blink::WebMouseEvent& event) override; |
459 bool WillHandleGestureEvent(const blink::WebGestureEvent& event) override; | 463 bool WillHandleGestureEvent(const blink::WebGestureEvent& event) override; |
460 bool HasTouchEventHandlersAt(const gfx::Point& point) const override; | 464 bool HasTouchEventHandlersAt(const gfx::Point& point) const override; |
461 void OnSetFocus(bool enable) override; | 465 void OnSetFocus(bool enable) override; |
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
894 | 898 |
895 // Bookkeeping to suppress redundant scroll and focus requests for an already | 899 // Bookkeeping to suppress redundant scroll and focus requests for an already |
896 // scrolled and focused editable node. | 900 // scrolled and focused editable node. |
897 bool has_scrolled_focused_editable_node_into_rect_; | 901 bool has_scrolled_focused_editable_node_into_rect_; |
898 gfx::Rect rect_for_scrolled_focused_editable_node_; | 902 gfx::Rect rect_for_scrolled_focused_editable_node_; |
899 | 903 |
900 // Helper objects ------------------------------------------------------------ | 904 // Helper objects ------------------------------------------------------------ |
901 | 905 |
902 RenderFrameImpl* main_render_frame_; | 906 RenderFrameImpl* main_render_frame_; |
903 | 907 |
| 908 // Note: RenderViewImpl is pulling double duty: it's the RenderWidget for the |
| 909 // "view", but it's also the RenderWidget for the main frame. |
| 910 blink::WebWidget* frame_widget_; |
| 911 |
904 // The next group of objects all implement RenderViewObserver, so are deleted | 912 // The next group of objects all implement RenderViewObserver, so are deleted |
905 // along with the RenderView automatically. This is why we just store | 913 // along with the RenderView automatically. This is why we just store |
906 // weak references. | 914 // weak references. |
907 | 915 |
908 // The speech recognition dispatcher attached to this view, lazily | 916 // The speech recognition dispatcher attached to this view, lazily |
909 // initialized. | 917 // initialized. |
910 SpeechRecognitionDispatcher* speech_recognition_dispatcher_; | 918 SpeechRecognitionDispatcher* speech_recognition_dispatcher_; |
911 | 919 |
912 // Mouse Lock dispatcher attached to this view. | 920 // Mouse Lock dispatcher attached to this view. |
913 MouseLockDispatcher* mouse_lock_dispatcher_; | 921 MouseLockDispatcher* mouse_lock_dispatcher_; |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1013 // use the Observer interface to filter IPC messages and receive frame change | 1021 // use the Observer interface to filter IPC messages and receive frame change |
1014 // notifications. | 1022 // notifications. |
1015 // --------------------------------------------------------------------------- | 1023 // --------------------------------------------------------------------------- |
1016 | 1024 |
1017 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); | 1025 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); |
1018 }; | 1026 }; |
1019 | 1027 |
1020 } // namespace content | 1028 } // namespace content |
1021 | 1029 |
1022 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 1030 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
OLD | NEW |