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

Side by Side Diff: content/renderer/render_view_impl.h

Issue 1303773002: Give the main frame a RenderWidget. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix all the tests. Probably. Created 5 years, 2 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_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
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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 void FrameDidStartLoading(blink::WebFrame* frame); 229 void FrameDidStartLoading(blink::WebFrame* frame);
229 void FrameDidStopLoading(blink::WebFrame* frame); 230 void FrameDidStopLoading(blink::WebFrame* frame);
230 231
231 // Sets the zoom level and notifies observers. Doesn't call zoomLevelChanged, 232 // Sets the zoom level and notifies observers. Doesn't call zoomLevelChanged,
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
239 void AttachWebFrameWidget(blink::WebWidget* frame_widget);
240
238 // Plugin-related functions -------------------------------------------------- 241 // Plugin-related functions --------------------------------------------------
239 242
240 #if defined(ENABLE_PLUGINS) 243 #if defined(ENABLE_PLUGINS)
241 // Get/set the plugin which will be used as to handle document find requests. 244 // Get/set the plugin which will be used as to handle document find requests.
242 void set_plugin_find_handler(PepperPluginInstanceImpl* plugin) { 245 void set_plugin_find_handler(PepperPluginInstanceImpl* plugin) {
243 plugin_find_handler_ = plugin; 246 plugin_find_handler_ = plugin;
244 } 247 }
245 PepperPluginInstanceImpl* plugin_find_handler() { 248 PepperPluginInstanceImpl* plugin_find_handler() {
246 return plugin_find_handler_; 249 return plugin_find_handler_;
247 } 250 }
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 bool animate) override; 441 bool animate) override;
439 #endif 442 #endif
440 bool uses_temporary_zoom_level() const { return uses_temporary_zoom_level_; } 443 bool uses_temporary_zoom_level() const { return uses_temporary_zoom_level_; }
441 444
442 // Please do not add your stuff randomly to the end here. If there is an 445 // Please do not add your stuff randomly to the end here. If there is an
443 // appropriate section, add it there. If not, there are some random functions 446 // appropriate section, add it there. If not, there are some random functions
444 // nearer to the top you can add it to. 447 // nearer to the top you can add it to.
445 448
446 protected: 449 protected:
447 // RenderWidget overrides: 450 // RenderWidget overrides:
451 void CloseForFrame() override;
448 void Close() override; 452 void Close() override;
449 void OnResize(const ViewMsg_Resize_Params& params) override; 453 void OnResize(const ViewMsg_Resize_Params& params) override;
450 void DidInitiatePaint() override; 454 void DidInitiatePaint() override;
451 void DidFlushPaint() override; 455 void DidFlushPaint() override;
452 gfx::Vector2d GetScrollOffset() override; 456 gfx::Vector2d GetScrollOffset() override;
453 void DidHandleKeyEvent() override; 457 void DidHandleKeyEvent() override;
454 bool WillHandleMouseEvent(const blink::WebMouseEvent& event) override; 458 bool WillHandleMouseEvent(const blink::WebMouseEvent& event) override;
455 bool WillHandleGestureEvent(const blink::WebGestureEvent& event) override; 459 bool WillHandleGestureEvent(const blink::WebGestureEvent& event) override;
456 bool HasTouchEventHandlersAt(const gfx::Point& point) const override; 460 bool HasTouchEventHandlersAt(const gfx::Point& point) const override;
457 void OnSetFocus(bool enable) override; 461 void OnSetFocus(bool enable) override;
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
890 894
891 // Bookkeeping to suppress redundant scroll and focus requests for an already 895 // Bookkeeping to suppress redundant scroll and focus requests for an already
892 // scrolled and focused editable node. 896 // scrolled and focused editable node.
893 bool has_scrolled_focused_editable_node_into_rect_; 897 bool has_scrolled_focused_editable_node_into_rect_;
894 gfx::Rect rect_for_scrolled_focused_editable_node_; 898 gfx::Rect rect_for_scrolled_focused_editable_node_;
895 899
896 // Helper objects ------------------------------------------------------------ 900 // Helper objects ------------------------------------------------------------
897 901
898 RenderFrameImpl* main_render_frame_; 902 RenderFrameImpl* main_render_frame_;
899 903
904 // Note: RenderViewImpl is pulling double duty: it's the RenderWidget for the
905 // "view", but it's also the RenderWidget for the main frame.
906 blink::WebWidget* frame_widget_;
907
900 // The next group of objects all implement RenderViewObserver, so are deleted 908 // The next group of objects all implement RenderViewObserver, so are deleted
901 // along with the RenderView automatically. This is why we just store 909 // along with the RenderView automatically. This is why we just store
902 // weak references. 910 // weak references.
903 911
904 // The speech recognition dispatcher attached to this view, lazily 912 // The speech recognition dispatcher attached to this view, lazily
905 // initialized. 913 // initialized.
906 SpeechRecognitionDispatcher* speech_recognition_dispatcher_; 914 SpeechRecognitionDispatcher* speech_recognition_dispatcher_;
907 915
908 // Mouse Lock dispatcher attached to this view. 916 // Mouse Lock dispatcher attached to this view.
909 MouseLockDispatcher* mouse_lock_dispatcher_; 917 MouseLockDispatcher* mouse_lock_dispatcher_;
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
1009 // use the Observer interface to filter IPC messages and receive frame change 1017 // use the Observer interface to filter IPC messages and receive frame change
1010 // notifications. 1018 // notifications.
1011 // --------------------------------------------------------------------------- 1019 // ---------------------------------------------------------------------------
1012 1020
1013 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); 1021 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl);
1014 }; 1022 };
1015 1023
1016 } // namespace content 1024 } // namespace content
1017 1025
1018 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ 1026 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698