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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 class ImageResourceFetcher; | 138 class ImageResourceFetcher; |
139 class LoadProgressTracker; | 139 class LoadProgressTracker; |
140 class MidiDispatcher; | 140 class MidiDispatcher; |
141 class MediaStreamDispatcher; | 141 class MediaStreamDispatcher; |
142 class MouseLockDispatcher; | 142 class MouseLockDispatcher; |
143 class NavigationState; | 143 class NavigationState; |
144 class PepperPluginInstanceImpl; | 144 class PepperPluginInstanceImpl; |
145 class PushMessagingDispatcher; | 145 class PushMessagingDispatcher; |
146 class RenderViewObserver; | 146 class RenderViewObserver; |
147 class RenderViewTest; | 147 class RenderViewTest; |
148 class RendererAccessibility; | |
149 class RendererDateTimePicker; | 148 class RendererDateTimePicker; |
150 class RendererWebColorChooserImpl; | 149 class RendererWebColorChooserImpl; |
151 class SpeechRecognitionDispatcher; | 150 class SpeechRecognitionDispatcher; |
152 class WebPluginDelegateProxy; | 151 class WebPluginDelegateProxy; |
153 struct DropData; | 152 struct DropData; |
154 struct FaviconURL; | 153 struct FaviconURL; |
155 struct FileChooserParams; | 154 struct FileChooserParams; |
156 struct RenderViewImplParams; | 155 struct RenderViewImplParams; |
157 | 156 |
158 #if defined(OS_ANDROID) | 157 #if defined(OS_ANDROID) |
(...skipping 23 matching lines...) Expand all Loading... |
182 int32 routing_id, | 181 int32 routing_id, |
183 int32 main_frame_routing_id, | 182 int32 main_frame_routing_id, |
184 int32 surface_id, | 183 int32 surface_id, |
185 int64 session_storage_namespace_id, | 184 int64 session_storage_namespace_id, |
186 const base::string16& frame_name, | 185 const base::string16& frame_name, |
187 bool is_renderer_created, | 186 bool is_renderer_created, |
188 bool swapped_out, | 187 bool swapped_out, |
189 bool hidden, | 188 bool hidden, |
190 bool never_visible, | 189 bool never_visible, |
191 int32 next_page_id, | 190 int32 next_page_id, |
192 const blink::WebScreenInfo& screen_info, | 191 const blink::WebScreenInfo& screen_info); |
193 AccessibilityMode accessibility_mode); | |
194 | 192 |
195 // Used by content_layouttest_support to hook into the creation of | 193 // Used by content_layouttest_support to hook into the creation of |
196 // RenderViewImpls. | 194 // RenderViewImpls. |
197 static void InstallCreateHook( | 195 static void InstallCreateHook( |
198 RenderViewImpl* (*create_render_view_impl)(RenderViewImplParams*)); | 196 RenderViewImpl* (*create_render_view_impl)(RenderViewImplParams*)); |
199 | 197 |
200 // Returns the RenderViewImpl containing the given WebView. | 198 // Returns the RenderViewImpl containing the given WebView. |
201 static RenderViewImpl* FromWebView(blink::WebView* webview); | 199 static RenderViewImpl* FromWebView(blink::WebView* webview); |
202 | 200 |
203 // Returns the RenderViewImpl for the given routing ID. | 201 // Returns the RenderViewImpl for the given routing ID. |
(...skipping 16 matching lines...) Expand all Loading... |
220 send_content_state_immediately_ = value; | 218 send_content_state_immediately_ = value; |
221 } | 219 } |
222 | 220 |
223 RenderFrameImpl* main_render_frame() { return main_render_frame_.get(); } | 221 RenderFrameImpl* main_render_frame() { return main_render_frame_.get(); } |
224 | 222 |
225 // TODO(jam): move to RenderFrameImpl | 223 // TODO(jam): move to RenderFrameImpl |
226 MediaStreamDispatcher* media_stream_dispatcher() { | 224 MediaStreamDispatcher* media_stream_dispatcher() { |
227 return media_stream_dispatcher_; | 225 return media_stream_dispatcher_; |
228 } | 226 } |
229 | 227 |
230 AccessibilityMode accessibility_mode() { | |
231 return accessibility_mode_; | |
232 } | |
233 | |
234 RendererAccessibility* renderer_accessibility() { | |
235 return renderer_accessibility_; | |
236 } | |
237 | |
238 MouseLockDispatcher* mouse_lock_dispatcher() { | 228 MouseLockDispatcher* mouse_lock_dispatcher() { |
239 return mouse_lock_dispatcher_; | 229 return mouse_lock_dispatcher_; |
240 } | 230 } |
241 | 231 |
242 HistoryController* history_controller() { | 232 HistoryController* history_controller() { |
243 return history_controller_.get(); | 233 return history_controller_.get(); |
244 } | 234 } |
245 | 235 |
246 // Lazily initialize this view's BrowserPluginManager and return it. | 236 // Lazily initialize this view's BrowserPluginManager and return it. |
247 BrowserPluginManager* GetBrowserPluginManager(); | 237 BrowserPluginManager* GetBrowserPluginManager(); |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
582 const gfx::Point& root_layer_offset, | 572 const gfx::Point& root_layer_offset, |
583 float root_layer_scale) OVERRIDE; | 573 float root_layer_scale) OVERRIDE; |
584 | 574 |
585 // Do not delete directly. This class is reference counted. | 575 // Do not delete directly. This class is reference counted. |
586 virtual ~RenderViewImpl(); | 576 virtual ~RenderViewImpl(); |
587 | 577 |
588 private: | 578 private: |
589 // For unit tests. | 579 // For unit tests. |
590 friend class ExternalPopupMenuTest; | 580 friend class ExternalPopupMenuTest; |
591 friend class PepperDeviceTest; | 581 friend class PepperDeviceTest; |
592 friend class RendererAccessibilityTest; | |
593 friend class RenderViewTest; | 582 friend class RenderViewTest; |
594 | 583 |
595 // TODO(nasko): Temporarily friend RenderFrameImpl, so we don't duplicate | 584 // TODO(nasko): Temporarily friend RenderFrameImpl, so we don't duplicate |
596 // utility functions needed in both classes, while we move frame specific | 585 // utility functions needed in both classes, while we move frame specific |
597 // code away from this class. | 586 // code away from this class. |
598 friend class RenderFrameImpl; | 587 friend class RenderFrameImpl; |
599 | 588 |
600 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuRemoveTest, RemoveOnChange); | 589 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuRemoveTest, RemoveOnChange); |
601 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, NormalCase); | 590 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, NormalCase); |
602 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, ShowPopupThenNavigate); | 591 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, ShowPopupThenNavigate); |
603 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, DecideNavigationPolicyForWebUI); | 592 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, DecideNavigationPolicyForWebUI); |
604 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, | 593 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, |
605 DidFailProvisionalLoadWithErrorForError); | 594 DidFailProvisionalLoadWithErrorForError); |
606 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, | 595 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, |
607 DidFailProvisionalLoadWithErrorForCancellation); | 596 DidFailProvisionalLoadWithErrorForCancellation); |
608 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, | 597 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, |
609 DontIgnoreBackAfterNavEntryLimit); | 598 DontIgnoreBackAfterNavEntryLimit); |
610 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, ImeComposition); | 599 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, ImeComposition); |
611 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, InsertCharacters); | 600 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, InsertCharacters); |
612 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, JSBlockSentAfterPageLoad); | 601 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, JSBlockSentAfterPageLoad); |
613 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, LastCommittedUpdateState); | 602 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, LastCommittedUpdateState); |
614 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnHandleKeyboardEvent); | 603 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnHandleKeyboardEvent); |
615 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnImeTypeChanged); | 604 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnImeTypeChanged); |
616 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnNavStateChanged); | 605 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnNavStateChanged); |
617 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnSetAccessibilityMode); | 606 //FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnSetAccessibilityMode); |
618 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnSetTextDirection); | 607 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnSetTextDirection); |
619 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnUpdateWebPreferences); | 608 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnUpdateWebPreferences); |
620 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, | 609 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, |
621 SetEditableSelectionAndComposition); | 610 SetEditableSelectionAndComposition); |
622 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, StaleNavigationsIgnored); | 611 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, StaleNavigationsIgnored); |
623 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, UpdateTargetURLWithInvalidURL); | 612 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, UpdateTargetURLWithInvalidURL); |
624 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, | 613 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, |
625 GetCompositionCharacterBoundsTest); | 614 GetCompositionCharacterBoundsTest); |
626 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnNavigationHttpPost); | 615 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnNavigationHttpPost); |
627 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, | 616 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
733 const std::vector<base::FilePath>& local_paths, | 722 const std::vector<base::FilePath>& local_paths, |
734 const base::FilePath& local_directory_name); | 723 const base::FilePath& local_directory_name); |
735 void OnMediaPlayerActionAt(const gfx::Point& location, | 724 void OnMediaPlayerActionAt(const gfx::Point& location, |
736 const blink::WebMediaPlayerAction& action); | 725 const blink::WebMediaPlayerAction& action); |
737 void OnPluginActionAt(const gfx::Point& location, | 726 void OnPluginActionAt(const gfx::Point& location, |
738 const blink::WebPluginAction& action); | 727 const blink::WebPluginAction& action); |
739 void OnMoveOrResizeStarted(); | 728 void OnMoveOrResizeStarted(); |
740 void OnPostMessageEvent(const ViewMsg_PostMessage_Params& params); | 729 void OnPostMessageEvent(const ViewMsg_PostMessage_Params& params); |
741 void OnReleaseDisambiguationPopupBitmap(const cc::SharedBitmapId& id); | 730 void OnReleaseDisambiguationPopupBitmap(const cc::SharedBitmapId& id); |
742 void OnResetPageEncodingToDefault(); | 731 void OnResetPageEncodingToDefault(); |
743 void OnSetAccessibilityMode(AccessibilityMode new_mode); | |
744 void OnSetActive(bool active); | 732 void OnSetActive(bool active); |
745 void OnSetBackground(const SkBitmap& background); | 733 void OnSetBackground(const SkBitmap& background); |
746 void OnExitFullscreen(); | 734 void OnExitFullscreen(); |
747 void OnSetHistoryLengthAndPrune(int history_length, int32 minimum_page_id); | 735 void OnSetHistoryLengthAndPrune(int history_length, int32 minimum_page_id); |
748 void OnSetInitialFocus(bool reverse); | 736 void OnSetInitialFocus(bool reverse); |
749 void OnSetPageEncoding(const std::string& encoding_name); | 737 void OnSetPageEncoding(const std::string& encoding_name); |
750 void OnSetRendererPrefs(const RendererPreferences& renderer_prefs); | 738 void OnSetRendererPrefs(const RendererPreferences& renderer_prefs); |
751 void OnSetWebUIProperty(const std::string& name, const std::string& value); | 739 void OnSetWebUIProperty(const std::string& name, const std::string& value); |
752 void OnSetZoomLevel(double zoom_level); | 740 void OnSetZoomLevel(double zoom_level); |
753 void OnSetZoomLevelForLoadingURL(const GURL& url, double zoom_level); | 741 void OnSetZoomLevelForLoadingURL(const GURL& url, double zoom_level); |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1079 MediaStreamDispatcher* media_stream_dispatcher_; | 1067 MediaStreamDispatcher* media_stream_dispatcher_; |
1080 | 1068 |
1081 // BrowserPluginManager attached to this view; lazily initialized. | 1069 // BrowserPluginManager attached to this view; lazily initialized. |
1082 scoped_refptr<BrowserPluginManager> browser_plugin_manager_; | 1070 scoped_refptr<BrowserPluginManager> browser_plugin_manager_; |
1083 | 1071 |
1084 // MidiClient attached to this view; lazily initialized. | 1072 // MidiClient attached to this view; lazily initialized. |
1085 MidiDispatcher* midi_dispatcher_; | 1073 MidiDispatcher* midi_dispatcher_; |
1086 | 1074 |
1087 DevToolsAgent* devtools_agent_; | 1075 DevToolsAgent* devtools_agent_; |
1088 | 1076 |
1089 // The current accessibility mode. | |
1090 AccessibilityMode accessibility_mode_; | |
1091 | |
1092 // Only valid if |accessibility_mode_| is anything other than | |
1093 // AccessibilityModeOff. | |
1094 RendererAccessibility* renderer_accessibility_; | |
1095 | |
1096 // Mouse Lock dispatcher attached to this view. | 1077 // Mouse Lock dispatcher attached to this view. |
1097 MouseLockDispatcher* mouse_lock_dispatcher_; | 1078 MouseLockDispatcher* mouse_lock_dispatcher_; |
1098 | 1079 |
1099 scoped_ptr<HistoryController> history_controller_; | 1080 scoped_ptr<HistoryController> history_controller_; |
1100 | 1081 |
1101 #if defined(OS_ANDROID) | 1082 #if defined(OS_ANDROID) |
1102 // Android Specific --------------------------------------------------------- | 1083 // Android Specific --------------------------------------------------------- |
1103 | 1084 |
1104 // Expected id of the next content intent launched. Used to prevent scheduled | 1085 // Expected id of the next content intent launched. Used to prevent scheduled |
1105 // intents to be launched if aborted. | 1086 // intents to be launched if aborted. |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1212 // use the Observer interface to filter IPC messages and receive frame change | 1193 // use the Observer interface to filter IPC messages and receive frame change |
1213 // notifications. | 1194 // notifications. |
1214 // --------------------------------------------------------------------------- | 1195 // --------------------------------------------------------------------------- |
1215 | 1196 |
1216 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); | 1197 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); |
1217 }; | 1198 }; |
1218 | 1199 |
1219 } // namespace content | 1200 } // namespace content |
1220 | 1201 |
1221 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 1202 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
OLD | NEW |