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 26 matching lines...) Expand all Loading... |
185 int32 main_frame_routing_id, | 184 int32 main_frame_routing_id, |
186 int32 surface_id, | 185 int32 surface_id, |
187 int64 session_storage_namespace_id, | 186 int64 session_storage_namespace_id, |
188 const base::string16& frame_name, | 187 const base::string16& frame_name, |
189 bool is_renderer_created, | 188 bool is_renderer_created, |
190 bool swapped_out, | 189 bool swapped_out, |
191 int32 proxy_routing_id, | 190 int32 proxy_routing_id, |
192 bool hidden, | 191 bool hidden, |
193 bool never_visible, | 192 bool never_visible, |
194 int32 next_page_id, | 193 int32 next_page_id, |
195 const blink::WebScreenInfo& screen_info, | 194 const blink::WebScreenInfo& screen_info); |
196 AccessibilityMode accessibility_mode); | |
197 | 195 |
198 // Used by content_layouttest_support to hook into the creation of | 196 // Used by content_layouttest_support to hook into the creation of |
199 // RenderViewImpls. | 197 // RenderViewImpls. |
200 static void InstallCreateHook( | 198 static void InstallCreateHook( |
201 RenderViewImpl* (*create_render_view_impl)(RenderViewImplParams*)); | 199 RenderViewImpl* (*create_render_view_impl)(RenderViewImplParams*)); |
202 | 200 |
203 // Returns the RenderViewImpl containing the given WebView. | 201 // Returns the RenderViewImpl containing the given WebView. |
204 static RenderViewImpl* FromWebView(blink::WebView* webview); | 202 static RenderViewImpl* FromWebView(blink::WebView* webview); |
205 | 203 |
206 // Returns the RenderViewImpl for the given routing ID. | 204 // Returns the RenderViewImpl for the given routing ID. |
(...skipping 16 matching lines...) Expand all Loading... |
223 send_content_state_immediately_ = value; | 221 send_content_state_immediately_ = value; |
224 } | 222 } |
225 | 223 |
226 RenderFrameImpl* main_render_frame() { return main_render_frame_.get(); } | 224 RenderFrameImpl* main_render_frame() { return main_render_frame_.get(); } |
227 | 225 |
228 // TODO(jam): move to RenderFrameImpl | 226 // TODO(jam): move to RenderFrameImpl |
229 MediaStreamDispatcher* media_stream_dispatcher() { | 227 MediaStreamDispatcher* media_stream_dispatcher() { |
230 return media_stream_dispatcher_; | 228 return media_stream_dispatcher_; |
231 } | 229 } |
232 | 230 |
233 AccessibilityMode accessibility_mode() { | |
234 return accessibility_mode_; | |
235 } | |
236 | |
237 RendererAccessibility* renderer_accessibility() { | |
238 return renderer_accessibility_; | |
239 } | |
240 | |
241 MouseLockDispatcher* mouse_lock_dispatcher() { | 231 MouseLockDispatcher* mouse_lock_dispatcher() { |
242 return mouse_lock_dispatcher_; | 232 return mouse_lock_dispatcher_; |
243 } | 233 } |
244 | 234 |
245 HistoryController* history_controller() { | 235 HistoryController* history_controller() { |
246 return history_controller_.get(); | 236 return history_controller_.get(); |
247 } | 237 } |
248 | 238 |
249 // Lazily initialize this view's BrowserPluginManager and return it. | 239 // Lazily initialize this view's BrowserPluginManager and return it. |
250 BrowserPluginManager* GetBrowserPluginManager(); | 240 BrowserPluginManager* GetBrowserPluginManager(); |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
589 const gfx::Point& root_layer_offset, | 579 const gfx::Point& root_layer_offset, |
590 float root_layer_scale) OVERRIDE; | 580 float root_layer_scale) OVERRIDE; |
591 | 581 |
592 // Do not delete directly. This class is reference counted. | 582 // Do not delete directly. This class is reference counted. |
593 virtual ~RenderViewImpl(); | 583 virtual ~RenderViewImpl(); |
594 | 584 |
595 private: | 585 private: |
596 // For unit tests. | 586 // For unit tests. |
597 friend class ExternalPopupMenuTest; | 587 friend class ExternalPopupMenuTest; |
598 friend class PepperDeviceTest; | 588 friend class PepperDeviceTest; |
599 friend class RendererAccessibilityTest; | |
600 friend class RenderViewTest; | 589 friend class RenderViewTest; |
601 | 590 |
602 // TODO(nasko): Temporarily friend RenderFrameImpl, so we don't duplicate | 591 // TODO(nasko): Temporarily friend RenderFrameImpl, so we don't duplicate |
603 // utility functions needed in both classes, while we move frame specific | 592 // utility functions needed in both classes, while we move frame specific |
604 // code away from this class. | 593 // code away from this class. |
605 friend class RenderFrameImpl; | 594 friend class RenderFrameImpl; |
606 | 595 |
607 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuRemoveTest, RemoveOnChange); | 596 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuRemoveTest, RemoveOnChange); |
608 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, NormalCase); | 597 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, NormalCase); |
609 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, ShowPopupThenNavigate); | 598 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, ShowPopupThenNavigate); |
610 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, DecideNavigationPolicyForWebUI); | 599 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, DecideNavigationPolicyForWebUI); |
611 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, | 600 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, |
612 DidFailProvisionalLoadWithErrorForError); | 601 DidFailProvisionalLoadWithErrorForError); |
613 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, | 602 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, |
614 DidFailProvisionalLoadWithErrorForCancellation); | 603 DidFailProvisionalLoadWithErrorForCancellation); |
615 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, | 604 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, |
616 DontIgnoreBackAfterNavEntryLimit); | 605 DontIgnoreBackAfterNavEntryLimit); |
617 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, ImeComposition); | 606 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, ImeComposition); |
618 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, InsertCharacters); | 607 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, InsertCharacters); |
619 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, JSBlockSentAfterPageLoad); | 608 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, JSBlockSentAfterPageLoad); |
620 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, LastCommittedUpdateState); | 609 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, LastCommittedUpdateState); |
621 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnHandleKeyboardEvent); | 610 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnHandleKeyboardEvent); |
622 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnImeTypeChanged); | 611 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnImeTypeChanged); |
623 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnNavStateChanged); | 612 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnNavStateChanged); |
624 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnSetAccessibilityMode); | 613 //FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnSetAccessibilityMode); |
625 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnSetTextDirection); | 614 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnSetTextDirection); |
626 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnUpdateWebPreferences); | 615 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnUpdateWebPreferences); |
627 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, | 616 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, |
628 SetEditableSelectionAndComposition); | 617 SetEditableSelectionAndComposition); |
629 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, StaleNavigationsIgnored); | 618 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, StaleNavigationsIgnored); |
630 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, UpdateTargetURLWithInvalidURL); | 619 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, UpdateTargetURLWithInvalidURL); |
631 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, | 620 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, |
632 GetCompositionCharacterBoundsTest); | 621 GetCompositionCharacterBoundsTest); |
633 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnNavigationHttpPost); | 622 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnNavigationHttpPost); |
634 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, | 623 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
740 const std::vector<base::FilePath>& local_paths, | 729 const std::vector<base::FilePath>& local_paths, |
741 const base::FilePath& local_directory_name); | 730 const base::FilePath& local_directory_name); |
742 void OnMediaPlayerActionAt(const gfx::Point& location, | 731 void OnMediaPlayerActionAt(const gfx::Point& location, |
743 const blink::WebMediaPlayerAction& action); | 732 const blink::WebMediaPlayerAction& action); |
744 void OnPluginActionAt(const gfx::Point& location, | 733 void OnPluginActionAt(const gfx::Point& location, |
745 const blink::WebPluginAction& action); | 734 const blink::WebPluginAction& action); |
746 void OnMoveOrResizeStarted(); | 735 void OnMoveOrResizeStarted(); |
747 void OnPostMessageEvent(const ViewMsg_PostMessage_Params& params); | 736 void OnPostMessageEvent(const ViewMsg_PostMessage_Params& params); |
748 void OnReleaseDisambiguationPopupBitmap(const cc::SharedBitmapId& id); | 737 void OnReleaseDisambiguationPopupBitmap(const cc::SharedBitmapId& id); |
749 void OnResetPageEncodingToDefault(); | 738 void OnResetPageEncodingToDefault(); |
750 void OnSetAccessibilityMode(AccessibilityMode new_mode); | |
751 void OnSetActive(bool active); | 739 void OnSetActive(bool active); |
752 void OnSetBackgroundOpaque(bool opaque); | 740 void OnSetBackgroundOpaque(bool opaque); |
753 void OnExitFullscreen(); | 741 void OnExitFullscreen(); |
754 void OnSetHistoryLengthAndPrune(int history_length, int32 minimum_page_id); | 742 void OnSetHistoryLengthAndPrune(int history_length, int32 minimum_page_id); |
755 void OnSetInitialFocus(bool reverse); | 743 void OnSetInitialFocus(bool reverse); |
756 void OnSetPageEncoding(const std::string& encoding_name); | 744 void OnSetPageEncoding(const std::string& encoding_name); |
757 void OnSetRendererPrefs(const RendererPreferences& renderer_prefs); | 745 void OnSetRendererPrefs(const RendererPreferences& renderer_prefs); |
758 void OnSetWebUIProperty(const std::string& name, const std::string& value); | 746 void OnSetWebUIProperty(const std::string& name, const std::string& value); |
759 void OnSetZoomLevel(double zoom_level); | 747 void OnSetZoomLevel(double zoom_level); |
760 void OnSetZoomLevelForLoadingURL(const GURL& url, double zoom_level); | 748 void OnSetZoomLevelForLoadingURL(const GURL& url, double zoom_level); |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1087 MediaStreamDispatcher* media_stream_dispatcher_; | 1075 MediaStreamDispatcher* media_stream_dispatcher_; |
1088 | 1076 |
1089 // BrowserPluginManager attached to this view; lazily initialized. | 1077 // BrowserPluginManager attached to this view; lazily initialized. |
1090 scoped_refptr<BrowserPluginManager> browser_plugin_manager_; | 1078 scoped_refptr<BrowserPluginManager> browser_plugin_manager_; |
1091 | 1079 |
1092 // MidiClient attached to this view; lazily initialized. | 1080 // MidiClient attached to this view; lazily initialized. |
1093 MidiDispatcher* midi_dispatcher_; | 1081 MidiDispatcher* midi_dispatcher_; |
1094 | 1082 |
1095 DevToolsAgent* devtools_agent_; | 1083 DevToolsAgent* devtools_agent_; |
1096 | 1084 |
1097 // The current accessibility mode. | |
1098 AccessibilityMode accessibility_mode_; | |
1099 | |
1100 // Only valid if |accessibility_mode_| is anything other than | |
1101 // AccessibilityModeOff. | |
1102 RendererAccessibility* renderer_accessibility_; | |
1103 | |
1104 // Mouse Lock dispatcher attached to this view. | 1085 // Mouse Lock dispatcher attached to this view. |
1105 MouseLockDispatcher* mouse_lock_dispatcher_; | 1086 MouseLockDispatcher* mouse_lock_dispatcher_; |
1106 | 1087 |
1107 scoped_ptr<HistoryController> history_controller_; | 1088 scoped_ptr<HistoryController> history_controller_; |
1108 | 1089 |
1109 #if defined(OS_ANDROID) | 1090 #if defined(OS_ANDROID) |
1110 // Android Specific --------------------------------------------------------- | 1091 // Android Specific --------------------------------------------------------- |
1111 | 1092 |
1112 // Expected id of the next content intent launched. Used to prevent scheduled | 1093 // Expected id of the next content intent launched. Used to prevent scheduled |
1113 // intents to be launched if aborted. | 1094 // intents to be launched if aborted. |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1220 // use the Observer interface to filter IPC messages and receive frame change | 1201 // use the Observer interface to filter IPC messages and receive frame change |
1221 // notifications. | 1202 // notifications. |
1222 // --------------------------------------------------------------------------- | 1203 // --------------------------------------------------------------------------- |
1223 | 1204 |
1224 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); | 1205 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); |
1225 }; | 1206 }; |
1226 | 1207 |
1227 } // namespace content | 1208 } // namespace content |
1228 | 1209 |
1229 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 1210 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
OLD | NEW |