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

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

Issue 1980133002: Implement pointer lock API for out-of-process iframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 21 matching lines...) Expand all
32 #include "content/common/frame_message_enums.h" 32 #include "content/common/frame_message_enums.h"
33 #include "content/common/navigation_gesture.h" 33 #include "content/common/navigation_gesture.h"
34 #include "content/common/page_message_enums.h" 34 #include "content/common/page_message_enums.h"
35 #include "content/common/view_message_enums.h" 35 #include "content/common/view_message_enums.h"
36 #include "content/public/common/page_zoom.h" 36 #include "content/public/common/page_zoom.h"
37 #include "content/public/common/referrer.h" 37 #include "content/public/common/referrer.h"
38 #include "content/public/common/renderer_preferences.h" 38 #include "content/public/common/renderer_preferences.h"
39 #include "content/public/common/top_controls_state.h" 39 #include "content/public/common/top_controls_state.h"
40 #include "content/public/common/web_preferences.h" 40 #include "content/public/common/web_preferences.h"
41 #include "content/public/renderer/render_view.h" 41 #include "content/public/renderer/render_view.h"
42 #include "content/renderer/mouse_lock_dispatcher.h"
43 #include "content/renderer/render_frame_impl.h" 42 #include "content/renderer/render_frame_impl.h"
44 #include "content/renderer/render_widget.h" 43 #include "content/renderer/render_widget.h"
45 #include "content/renderer/render_widget_owner_delegate.h" 44 #include "content/renderer/render_widget_owner_delegate.h"
46 #include "content/renderer/stats_collection_observer.h" 45 #include "content/renderer/stats_collection_observer.h"
47 #include "ipc/ipc_platform_file.h" 46 #include "ipc/ipc_platform_file.h"
48 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h" 47 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h"
49 #include "third_party/WebKit/public/platform/WebSecurityOrigin.h" 48 #include "third_party/WebKit/public/platform/WebSecurityOrigin.h"
50 #include "third_party/WebKit/public/web/WebAXObject.h" 49 #include "third_party/WebKit/public/web/WebAXObject.h"
51 #include "third_party/WebKit/public/web/WebConsoleMessage.h" 50 #include "third_party/WebKit/public/web/WebConsoleMessage.h"
52 #include "third_party/WebKit/public/web/WebDataSource.h" 51 #include "third_party/WebKit/public/web/WebDataSource.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 113
115 #if defined(OS_ANDROID) 114 #if defined(OS_ANDROID)
116 class WebHitTestResult; 115 class WebHitTestResult;
117 #endif 116 #endif
118 } // namespace blink 117 } // namespace blink
119 118
120 namespace content { 119 namespace content {
121 120
122 class HistoryController; 121 class HistoryController;
123 class HistoryEntry; 122 class HistoryEntry;
124 class MouseLockDispatcher;
125 class PageState; 123 class PageState;
126 class RenderViewImplTest; 124 class RenderViewImplTest;
127 class RenderViewObserver; 125 class RenderViewObserver;
128 class RenderViewTest; 126 class RenderViewTest;
129 class RendererDateTimePicker; 127 class RendererDateTimePicker;
130 class RendererWebColorChooserImpl; 128 class RendererWebColorChooserImpl;
131 class SpeechRecognitionDispatcher; 129 class SpeechRecognitionDispatcher;
132 class WebPluginDelegateProxy; 130 class WebPluginDelegateProxy;
133 struct DropData; 131 struct DropData;
134 struct FaviconURL; 132 struct FaviconURL;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 } 185 }
188 186
189 const RendererPreferences& renderer_preferences() const { 187 const RendererPreferences& renderer_preferences() const {
190 return renderer_preferences_; 188 return renderer_preferences_;
191 } 189 }
192 190
193 void set_send_content_state_immediately(bool value) { 191 void set_send_content_state_immediately(bool value) {
194 send_content_state_immediately_ = value; 192 send_content_state_immediately_ = value;
195 } 193 }
196 194
197 MouseLockDispatcher* mouse_lock_dispatcher() {
198 return mouse_lock_dispatcher_;
199 }
200
201 HistoryController* history_controller() { 195 HistoryController* history_controller() {
202 return history_controller_.get(); 196 return history_controller_.get();
203 } 197 }
204 198
205 // Functions to add and remove observers for this object. 199 // Functions to add and remove observers for this object.
206 void AddObserver(RenderViewObserver* observer); 200 void AddObserver(RenderViewObserver* observer);
207 void RemoveObserver(RenderViewObserver* observer); 201 void RemoveObserver(RenderViewObserver* observer);
208 202
209 // Returns the StatsCollectionObserver associated with this view, or NULL 203 // Returns the StatsCollectionObserver associated with this view, or NULL
210 // if one wasn't created; 204 // if one wasn't created;
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 280
287 // IPC::Listener implementation ---------------------------------------------- 281 // IPC::Listener implementation ----------------------------------------------
288 282
289 bool OnMessageReceived(const IPC::Message& msg) override; 283 bool OnMessageReceived(const IPC::Message& msg) override;
290 284
291 // blink::WebWidgetClient implementation ------------------------------------ 285 // blink::WebWidgetClient implementation ------------------------------------
292 286
293 // Most methods are handled by RenderWidget. 287 // Most methods are handled by RenderWidget.
294 void didFocus() override; 288 void didFocus() override;
295 void show(blink::WebNavigationPolicy policy) override; 289 void show(blink::WebNavigationPolicy policy) override;
296 bool requestPointerLock() override;
297 void requestPointerUnlock() override;
298 bool isPointerLocked() override;
299 void didHandleGestureEvent(const blink::WebGestureEvent& event, 290 void didHandleGestureEvent(const blink::WebGestureEvent& event,
300 bool event_cancelled) override; 291 bool event_cancelled) override;
301 void onMouseDown(const blink::WebNode& mouse_down_node) override; 292 void onMouseDown(const blink::WebNode& mouse_down_node) override;
302 void initializeLayerTreeView() override; 293 void initializeLayerTreeView() override;
303 294
304 // TODO(lfg): Remove once WebViewClient no longer inherits from 295 // TODO(lfg): Remove once WebViewClient no longer inherits from
305 // WebWidgetClient. 296 // WebWidgetClient.
306 bool allowsBrokenNullLayerTreeView() const override; 297 bool allowsBrokenNullLayerTreeView() const override;
307 void closeWidgetSoon() override; 298 void closeWidgetSoon() override;
308 void convertViewportToWindow(blink::WebRect* rect) override; 299 void convertViewportToWindow(blink::WebRect* rect) override;
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
893 blink::WebFrameWidget* frame_widget_; 884 blink::WebFrameWidget* frame_widget_;
894 885
895 // The next group of objects all implement RenderViewObserver, so are deleted 886 // The next group of objects all implement RenderViewObserver, so are deleted
896 // along with the RenderView automatically. This is why we just store 887 // along with the RenderView automatically. This is why we just store
897 // weak references. 888 // weak references.
898 889
899 // The speech recognition dispatcher attached to this view, lazily 890 // The speech recognition dispatcher attached to this view, lazily
900 // initialized. 891 // initialized.
901 SpeechRecognitionDispatcher* speech_recognition_dispatcher_; 892 SpeechRecognitionDispatcher* speech_recognition_dispatcher_;
902 893
903 // Mouse Lock dispatcher attached to this view.
904 MouseLockDispatcher* mouse_lock_dispatcher_;
905
906 std::unique_ptr<HistoryController> history_controller_; 894 std::unique_ptr<HistoryController> history_controller_;
907 895
908 #if defined(OS_ANDROID) 896 #if defined(OS_ANDROID)
909 // Android Specific --------------------------------------------------------- 897 // Android Specific ---------------------------------------------------------
910 898
911 // Expected id of the next content intent launched. Used to prevent scheduled 899 // Expected id of the next content intent launched. Used to prevent scheduled
912 // intents to be launched if aborted. 900 // intents to be launched if aborted.
913 size_t expected_content_intent_id_; 901 size_t expected_content_intent_id_;
914 902
915 // List of click-based content detectors. 903 // List of click-based content detectors.
(...skipping 23 matching lines...) Expand all
939 int64_t session_storage_namespace_id_; 927 int64_t session_storage_namespace_id_;
940 928
941 // Stores edit commands associated to the next key event. 929 // Stores edit commands associated to the next key event.
942 // Shall be cleared as soon as the next key event is processed. 930 // Shall be cleared as soon as the next key event is processed.
943 EditCommands edit_commands_; 931 EditCommands edit_commands_;
944 932
945 // All the registered observers. We expect this list to be small, so vector 933 // All the registered observers. We expect this list to be small, so vector
946 // is fine. 934 // is fine.
947 base::ObserverList<RenderViewObserver> observers_; 935 base::ObserverList<RenderViewObserver> observers_;
948 936
949 // Wraps the |webwidget_| as a MouseLockDispatcher::LockTarget interface.
950 std::unique_ptr<MouseLockDispatcher::LockTarget> webwidget_mouse_lock_target_;
951
952 // This field stores drag/drop related info for the event that is currently 937 // This field stores drag/drop related info for the event that is currently
953 // being handled. If the current event results in starting a drag/drop 938 // being handled. If the current event results in starting a drag/drop
954 // session, this info is sent to the browser along with other drag/drop info. 939 // session, this info is sent to the browser along with other drag/drop info.
955 DragEventSourceInfo possible_drag_event_info_; 940 DragEventSourceInfo possible_drag_event_info_;
956 941
957 // NOTE: stats_collection_observer_ should be the last members because their 942 // NOTE: stats_collection_observer_ should be the last members because their
958 // constructors call the AddObservers method of RenderViewImpl. 943 // constructors call the AddObservers method of RenderViewImpl.
959 std::unique_ptr<StatsCollectionObserver> stats_collection_observer_; 944 std::unique_ptr<StatsCollectionObserver> stats_collection_observer_;
960 945
961 typedef std::map<cc::SharedBitmapId, cc::SharedBitmap*> BitmapMap; 946 typedef std::map<cc::SharedBitmapId, cc::SharedBitmap*> BitmapMap;
962 BitmapMap disambiguation_bitmaps_; 947 BitmapMap disambiguation_bitmaps_;
963 948
964 // --------------------------------------------------------------------------- 949 // ---------------------------------------------------------------------------
965 // ADDING NEW DATA? Please see if it fits appropriately in one of the above 950 // ADDING NEW DATA? Please see if it fits appropriately in one of the above
966 // sections rather than throwing it randomly at the end. If you're adding a 951 // sections rather than throwing it randomly at the end. If you're adding a
967 // bunch of stuff, you should probably create a helper class and put your 952 // bunch of stuff, you should probably create a helper class and put your
968 // data and methods on that to avoid bloating RenderView more. You can 953 // data and methods on that to avoid bloating RenderView more. You can
969 // use the Observer interface to filter IPC messages and receive frame change 954 // use the Observer interface to filter IPC messages and receive frame change
970 // notifications. 955 // notifications.
971 // --------------------------------------------------------------------------- 956 // ---------------------------------------------------------------------------
972 957
973 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); 958 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl);
974 }; 959 };
975 960
976 } // namespace content 961 } // namespace content
977 962
978 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ 963 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_
OLDNEW
« no previous file with comments | « content/renderer/mouse_lock_dispatcher_browsertest.cc ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698