| 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 class FaviconHelper; | 128 class FaviconHelper; |
| 129 class HistoryController; | 129 class HistoryController; |
| 130 class HistoryEntry; | 130 class HistoryEntry; |
| 131 class ImageResourceFetcher; | 131 class ImageResourceFetcher; |
| 132 class MouseLockDispatcher; | 132 class MouseLockDispatcher; |
| 133 class NavigationState; | 133 class NavigationState; |
| 134 class PepperPluginInstanceImpl; | 134 class PepperPluginInstanceImpl; |
| 135 class RenderViewImplTest; | 135 class RenderViewImplTest; |
| 136 class RenderViewObserver; | 136 class RenderViewObserver; |
| 137 class RenderViewTest; | 137 class RenderViewTest; |
| 138 class RendererAccessibility; | |
| 139 class RendererDateTimePicker; | 138 class RendererDateTimePicker; |
| 140 class RendererWebColorChooserImpl; | 139 class RendererWebColorChooserImpl; |
| 141 class SpeechRecognitionDispatcher; | 140 class SpeechRecognitionDispatcher; |
| 142 class WebPluginDelegateProxy; | 141 class WebPluginDelegateProxy; |
| 143 struct DropData; | 142 struct DropData; |
| 144 struct FaviconURL; | 143 struct FaviconURL; |
| 145 struct FileChooserParams; | 144 struct FileChooserParams; |
| 146 struct RenderViewImplParams; | 145 struct RenderViewImplParams; |
| 147 | 146 |
| 148 #if defined(OS_ANDROID) | 147 #if defined(OS_ANDROID) |
| (...skipping 25 matching lines...) Expand all Loading... |
| 174 int32 main_frame_routing_id, | 173 int32 main_frame_routing_id, |
| 175 int32 surface_id, | 174 int32 surface_id, |
| 176 int64 session_storage_namespace_id, | 175 int64 session_storage_namespace_id, |
| 177 const base::string16& frame_name, | 176 const base::string16& frame_name, |
| 178 bool is_renderer_created, | 177 bool is_renderer_created, |
| 179 bool swapped_out, | 178 bool swapped_out, |
| 180 int32 proxy_routing_id, | 179 int32 proxy_routing_id, |
| 181 bool hidden, | 180 bool hidden, |
| 182 bool never_visible, | 181 bool never_visible, |
| 183 int32 next_page_id, | 182 int32 next_page_id, |
| 184 const blink::WebScreenInfo& screen_info, | 183 const blink::WebScreenInfo& screen_info); |
| 185 AccessibilityMode accessibility_mode); | |
| 186 | 184 |
| 187 // Used by content_layouttest_support to hook into the creation of | 185 // Used by content_layouttest_support to hook into the creation of |
| 188 // RenderViewImpls. | 186 // RenderViewImpls. |
| 189 static void InstallCreateHook( | 187 static void InstallCreateHook( |
| 190 RenderViewImpl* (*create_render_view_impl)(RenderViewImplParams*)); | 188 RenderViewImpl* (*create_render_view_impl)(RenderViewImplParams*)); |
| 191 | 189 |
| 192 // Returns the RenderViewImpl containing the given WebView. | 190 // Returns the RenderViewImpl containing the given WebView. |
| 193 static RenderViewImpl* FromWebView(blink::WebView* webview); | 191 static RenderViewImpl* FromWebView(blink::WebView* webview); |
| 194 | 192 |
| 195 // Returns the RenderViewImpl for the given routing ID. | 193 // Returns the RenderViewImpl for the given routing ID. |
| (...skipping 13 matching lines...) Expand all Loading... |
| 209 const RendererPreferences& renderer_preferences() const { | 207 const RendererPreferences& renderer_preferences() const { |
| 210 return renderer_preferences_; | 208 return renderer_preferences_; |
| 211 } | 209 } |
| 212 | 210 |
| 213 void set_send_content_state_immediately(bool value) { | 211 void set_send_content_state_immediately(bool value) { |
| 214 send_content_state_immediately_ = value; | 212 send_content_state_immediately_ = value; |
| 215 } | 213 } |
| 216 | 214 |
| 217 RenderFrameImpl* main_render_frame() { return main_render_frame_.get(); } | 215 RenderFrameImpl* main_render_frame() { return main_render_frame_.get(); } |
| 218 | 216 |
| 219 AccessibilityMode accessibility_mode() { | |
| 220 return accessibility_mode_; | |
| 221 } | |
| 222 | |
| 223 RendererAccessibility* renderer_accessibility() { | |
| 224 return renderer_accessibility_; | |
| 225 } | |
| 226 | |
| 227 MouseLockDispatcher* mouse_lock_dispatcher() { | 217 MouseLockDispatcher* mouse_lock_dispatcher() { |
| 228 return mouse_lock_dispatcher_; | 218 return mouse_lock_dispatcher_; |
| 229 } | 219 } |
| 230 | 220 |
| 231 HistoryController* history_controller() { | 221 HistoryController* history_controller() { |
| 232 return history_controller_.get(); | 222 return history_controller_.get(); |
| 233 } | 223 } |
| 234 | 224 |
| 235 // Lazily initialize this view's BrowserPluginManager and return it. | 225 // Lazily initialize this view's BrowserPluginManager and return it. |
| 236 BrowserPluginManager* GetBrowserPluginManager(); | 226 BrowserPluginManager* GetBrowserPluginManager(); |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 562 const gfx::Point& root_layer_offset, | 552 const gfx::Point& root_layer_offset, |
| 563 float root_layer_scale) OVERRIDE; | 553 float root_layer_scale) OVERRIDE; |
| 564 | 554 |
| 565 // Do not delete directly. This class is reference counted. | 555 // Do not delete directly. This class is reference counted. |
| 566 virtual ~RenderViewImpl(); | 556 virtual ~RenderViewImpl(); |
| 567 | 557 |
| 568 private: | 558 private: |
| 569 // For unit tests. | 559 // For unit tests. |
| 570 friend class ExternalPopupMenuTest; | 560 friend class ExternalPopupMenuTest; |
| 571 friend class PepperDeviceTest; | 561 friend class PepperDeviceTest; |
| 572 friend class RendererAccessibilityTest; | |
| 573 friend class RenderViewImplTest; | 562 friend class RenderViewImplTest; |
| 574 friend class RenderViewTest; | 563 friend class RenderViewTest; |
| 564 friend class RendererAccessibilityTest; |
| 575 | 565 |
| 576 // TODO(nasko): Temporarily friend RenderFrameImpl, so we don't duplicate | 566 // TODO(nasko): Temporarily friend RenderFrameImpl, so we don't duplicate |
| 577 // utility functions needed in both classes, while we move frame specific | 567 // utility functions needed in both classes, while we move frame specific |
| 578 // code away from this class. | 568 // code away from this class. |
| 579 friend class RenderFrameImpl; | 569 friend class RenderFrameImpl; |
| 580 | 570 |
| 581 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuRemoveTest, RemoveOnChange); | 571 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuRemoveTest, RemoveOnChange); |
| 582 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, NormalCase); | 572 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, NormalCase); |
| 583 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, ShowPopupThenNavigate); | 573 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, ShowPopupThenNavigate); |
| 584 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, DecideNavigationPolicyForWebUI); | 574 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, DecideNavigationPolicyForWebUI); |
| 585 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, | 575 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, |
| 586 DidFailProvisionalLoadWithErrorForError); | 576 DidFailProvisionalLoadWithErrorForError); |
| 587 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, | 577 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, |
| 588 DidFailProvisionalLoadWithErrorForCancellation); | 578 DidFailProvisionalLoadWithErrorForCancellation); |
| 589 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, | 579 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, |
| 590 DontIgnoreBackAfterNavEntryLimit); | 580 DontIgnoreBackAfterNavEntryLimit); |
| 591 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, ImeComposition); | 581 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, ImeComposition); |
| 592 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, InsertCharacters); | 582 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, InsertCharacters); |
| 593 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, JSBlockSentAfterPageLoad); | 583 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, JSBlockSentAfterPageLoad); |
| 594 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, LastCommittedUpdateState); | 584 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, LastCommittedUpdateState); |
| 595 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnHandleKeyboardEvent); | 585 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnHandleKeyboardEvent); |
| 596 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnImeTypeChanged); | 586 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnImeTypeChanged); |
| 597 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnNavStateChanged); | 587 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnNavStateChanged); |
| 598 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnSetAccessibilityMode); | |
| 599 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnSetTextDirection); | 588 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnSetTextDirection); |
| 600 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnUpdateWebPreferences); | 589 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnUpdateWebPreferences); |
| 601 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, | 590 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, |
| 602 SetEditableSelectionAndComposition); | 591 SetEditableSelectionAndComposition); |
| 603 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, StaleNavigationsIgnored); | 592 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, StaleNavigationsIgnored); |
| 604 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, UpdateTargetURLWithInvalidURL); | 593 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, UpdateTargetURLWithInvalidURL); |
| 605 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, | 594 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, |
| 606 GetCompositionCharacterBoundsTest); | 595 GetCompositionCharacterBoundsTest); |
| 607 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnNavigationHttpPost); | 596 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnNavigationHttpPost); |
| 608 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, | 597 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 713 const std::vector<base::FilePath>& local_paths, | 702 const std::vector<base::FilePath>& local_paths, |
| 714 const base::FilePath& local_directory_name); | 703 const base::FilePath& local_directory_name); |
| 715 void OnMediaPlayerActionAt(const gfx::Point& location, | 704 void OnMediaPlayerActionAt(const gfx::Point& location, |
| 716 const blink::WebMediaPlayerAction& action); | 705 const blink::WebMediaPlayerAction& action); |
| 717 void OnPluginActionAt(const gfx::Point& location, | 706 void OnPluginActionAt(const gfx::Point& location, |
| 718 const blink::WebPluginAction& action); | 707 const blink::WebPluginAction& action); |
| 719 void OnMoveOrResizeStarted(); | 708 void OnMoveOrResizeStarted(); |
| 720 void OnPostMessageEvent(const ViewMsg_PostMessage_Params& params); | 709 void OnPostMessageEvent(const ViewMsg_PostMessage_Params& params); |
| 721 void OnReleaseDisambiguationPopupBitmap(const cc::SharedBitmapId& id); | 710 void OnReleaseDisambiguationPopupBitmap(const cc::SharedBitmapId& id); |
| 722 void OnResetPageEncodingToDefault(); | 711 void OnResetPageEncodingToDefault(); |
| 723 void OnSetAccessibilityMode(AccessibilityMode new_mode); | |
| 724 void OnSetActive(bool active); | 712 void OnSetActive(bool active); |
| 725 void OnSetBackgroundOpaque(bool opaque); | 713 void OnSetBackgroundOpaque(bool opaque); |
| 726 void OnExitFullscreen(); | 714 void OnExitFullscreen(); |
| 727 void OnSetHistoryLengthAndPrune(int history_length, int32 minimum_page_id); | 715 void OnSetHistoryLengthAndPrune(int history_length, int32 minimum_page_id); |
| 728 void OnSetInitialFocus(bool reverse); | 716 void OnSetInitialFocus(bool reverse); |
| 729 void OnSetPageEncoding(const std::string& encoding_name); | 717 void OnSetPageEncoding(const std::string& encoding_name); |
| 730 void OnSetRendererPrefs(const RendererPreferences& renderer_prefs); | 718 void OnSetRendererPrefs(const RendererPreferences& renderer_prefs); |
| 731 void OnSetWebUIProperty(const std::string& name, const std::string& value); | 719 void OnSetWebUIProperty(const std::string& name, const std::string& value); |
| 732 void OnSetZoomLevelForLoadingURL(const GURL& url, double zoom_level); | 720 void OnSetZoomLevelForLoadingURL(const GURL& url, double zoom_level); |
| 733 void OnSetZoomLevelForView(bool uses_temporary_zoom_level, double level); | 721 void OnSetZoomLevelForView(bool uses_temporary_zoom_level, double level); |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1034 | 1022 |
| 1035 // The speech recognition dispatcher attached to this view, lazily | 1023 // The speech recognition dispatcher attached to this view, lazily |
| 1036 // initialized. | 1024 // initialized. |
| 1037 SpeechRecognitionDispatcher* speech_recognition_dispatcher_; | 1025 SpeechRecognitionDispatcher* speech_recognition_dispatcher_; |
| 1038 | 1026 |
| 1039 // BrowserPluginManager attached to this view; lazily initialized. | 1027 // BrowserPluginManager attached to this view; lazily initialized. |
| 1040 scoped_refptr<BrowserPluginManager> browser_plugin_manager_; | 1028 scoped_refptr<BrowserPluginManager> browser_plugin_manager_; |
| 1041 | 1029 |
| 1042 DevToolsAgent* devtools_agent_; | 1030 DevToolsAgent* devtools_agent_; |
| 1043 | 1031 |
| 1044 // The current accessibility mode. | |
| 1045 AccessibilityMode accessibility_mode_; | |
| 1046 | |
| 1047 // Only valid if |accessibility_mode_| is anything other than | |
| 1048 // AccessibilityModeOff. | |
| 1049 RendererAccessibility* renderer_accessibility_; | |
| 1050 | |
| 1051 // Mouse Lock dispatcher attached to this view. | 1032 // Mouse Lock dispatcher attached to this view. |
| 1052 MouseLockDispatcher* mouse_lock_dispatcher_; | 1033 MouseLockDispatcher* mouse_lock_dispatcher_; |
| 1053 | 1034 |
| 1054 scoped_ptr<HistoryController> history_controller_; | 1035 scoped_ptr<HistoryController> history_controller_; |
| 1055 | 1036 |
| 1056 #if defined(OS_ANDROID) | 1037 #if defined(OS_ANDROID) |
| 1057 // Android Specific --------------------------------------------------------- | 1038 // Android Specific --------------------------------------------------------- |
| 1058 | 1039 |
| 1059 // Expected id of the next content intent launched. Used to prevent scheduled | 1040 // Expected id of the next content intent launched. Used to prevent scheduled |
| 1060 // intents to be launched if aborted. | 1041 // intents to be launched if aborted. |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1160 // use the Observer interface to filter IPC messages and receive frame change | 1141 // use the Observer interface to filter IPC messages and receive frame change |
| 1161 // notifications. | 1142 // notifications. |
| 1162 // --------------------------------------------------------------------------- | 1143 // --------------------------------------------------------------------------- |
| 1163 | 1144 |
| 1164 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); | 1145 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); |
| 1165 }; | 1146 }; |
| 1166 | 1147 |
| 1167 } // namespace content | 1148 } // namespace content |
| 1168 | 1149 |
| 1169 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 1150 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
| OLD | NEW |