Chromium Code Reviews| 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 137 class HistoryEntry; | 137 class HistoryEntry; |
| 138 class ImageResourceFetcher; | 138 class ImageResourceFetcher; |
| 139 class MidiDispatcher; | 139 class MidiDispatcher; |
| 140 class MediaStreamDispatcher; | 140 class MediaStreamDispatcher; |
| 141 class MouseLockDispatcher; | 141 class MouseLockDispatcher; |
| 142 class NavigationState; | 142 class NavigationState; |
| 143 class PepperPluginInstanceImpl; | 143 class PepperPluginInstanceImpl; |
| 144 class PushMessagingDispatcher; | 144 class PushMessagingDispatcher; |
| 145 class RenderViewObserver; | 145 class RenderViewObserver; |
| 146 class RenderViewTest; | 146 class RenderViewTest; |
| 147 class RendererAccessibility; | |
| 148 class RendererDateTimePicker; | 147 class RendererDateTimePicker; |
| 149 class RendererWebColorChooserImpl; | 148 class RendererWebColorChooserImpl; |
| 150 class SpeechRecognitionDispatcher; | 149 class SpeechRecognitionDispatcher; |
| 151 class WebPluginDelegateProxy; | 150 class WebPluginDelegateProxy; |
| 152 struct DropData; | 151 struct DropData; |
| 153 struct FaviconURL; | 152 struct FaviconURL; |
| 154 struct FileChooserParams; | 153 struct FileChooserParams; |
| 155 struct RenderViewImplParams; | 154 struct RenderViewImplParams; |
| 156 | 155 |
| 157 #if defined(OS_ANDROID) | 156 #if defined(OS_ANDROID) |
| (...skipping 25 matching lines...) Expand all Loading... | |
| 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 int32 proxy_routing_id, | 188 int32 proxy_routing_id, |
| 190 bool hidden, | 189 bool hidden, |
| 191 bool never_visible, | 190 bool never_visible, |
| 192 int32 next_page_id, | 191 int32 next_page_id, |
| 193 const blink::WebScreenInfo& screen_info, | 192 const blink::WebScreenInfo& screen_info); |
| 194 AccessibilityMode accessibility_mode); | |
| 195 | 193 |
| 196 // Used by content_layouttest_support to hook into the creation of | 194 // Used by content_layouttest_support to hook into the creation of |
| 197 // RenderViewImpls. | 195 // RenderViewImpls. |
| 198 static void InstallCreateHook( | 196 static void InstallCreateHook( |
| 199 RenderViewImpl* (*create_render_view_impl)(RenderViewImplParams*)); | 197 RenderViewImpl* (*create_render_view_impl)(RenderViewImplParams*)); |
| 200 | 198 |
| 201 // Returns the RenderViewImpl containing the given WebView. | 199 // Returns the RenderViewImpl containing the given WebView. |
| 202 static RenderViewImpl* FromWebView(blink::WebView* webview); | 200 static RenderViewImpl* FromWebView(blink::WebView* webview); |
| 203 | 201 |
| 204 // Returns the RenderViewImpl for the given routing ID. | 202 // Returns the RenderViewImpl for the given routing ID. |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 221 send_content_state_immediately_ = value; | 219 send_content_state_immediately_ = value; |
| 222 } | 220 } |
| 223 | 221 |
| 224 RenderFrameImpl* main_render_frame() { return main_render_frame_.get(); } | 222 RenderFrameImpl* main_render_frame() { return main_render_frame_.get(); } |
| 225 | 223 |
| 226 // TODO(jam): move to RenderFrameImpl | 224 // TODO(jam): move to RenderFrameImpl |
| 227 MediaStreamDispatcher* media_stream_dispatcher() { | 225 MediaStreamDispatcher* media_stream_dispatcher() { |
| 228 return media_stream_dispatcher_; | 226 return media_stream_dispatcher_; |
| 229 } | 227 } |
| 230 | 228 |
| 231 AccessibilityMode accessibility_mode() { | |
| 232 return accessibility_mode_; | |
| 233 } | |
| 234 | |
| 235 RendererAccessibility* renderer_accessibility() { | |
| 236 return renderer_accessibility_; | |
| 237 } | |
| 238 | |
| 239 MouseLockDispatcher* mouse_lock_dispatcher() { | 229 MouseLockDispatcher* mouse_lock_dispatcher() { |
| 240 return mouse_lock_dispatcher_; | 230 return mouse_lock_dispatcher_; |
| 241 } | 231 } |
| 242 | 232 |
| 243 HistoryController* history_controller() { | 233 HistoryController* history_controller() { |
| 244 return history_controller_.get(); | 234 return history_controller_.get(); |
| 245 } | 235 } |
| 246 | 236 |
| 247 // Lazily initialize this view's BrowserPluginManager and return it. | 237 // Lazily initialize this view's BrowserPluginManager and return it. |
| 248 BrowserPluginManager* GetBrowserPluginManager(); | 238 BrowserPluginManager* GetBrowserPluginManager(); |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 584 const gfx::Point& root_layer_offset, | 574 const gfx::Point& root_layer_offset, |
| 585 float root_layer_scale) OVERRIDE; | 575 float root_layer_scale) OVERRIDE; |
| 586 | 576 |
| 587 // Do not delete directly. This class is reference counted. | 577 // Do not delete directly. This class is reference counted. |
| 588 virtual ~RenderViewImpl(); | 578 virtual ~RenderViewImpl(); |
| 589 | 579 |
| 590 private: | 580 private: |
| 591 // For unit tests. | 581 // For unit tests. |
| 592 friend class ExternalPopupMenuTest; | 582 friend class ExternalPopupMenuTest; |
| 593 friend class PepperDeviceTest; | 583 friend class PepperDeviceTest; |
| 594 friend class RendererAccessibilityTest; | |
| 595 friend class RenderViewTest; | 584 friend class RenderViewTest; |
| 596 | 585 |
| 597 // TODO(nasko): Temporarily friend RenderFrameImpl, so we don't duplicate | 586 // TODO(nasko): Temporarily friend RenderFrameImpl, so we don't duplicate |
| 598 // utility functions needed in both classes, while we move frame specific | 587 // utility functions needed in both classes, while we move frame specific |
| 599 // code away from this class. | 588 // code away from this class. |
| 600 friend class RenderFrameImpl; | 589 friend class RenderFrameImpl; |
| 601 | 590 |
| 602 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuRemoveTest, RemoveOnChange); | 591 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuRemoveTest, RemoveOnChange); |
| 603 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, NormalCase); | 592 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, NormalCase); |
| 604 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, ShowPopupThenNavigate); | 593 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, ShowPopupThenNavigate); |
| 605 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, DecideNavigationPolicyForWebUI); | 594 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, DecideNavigationPolicyForWebUI); |
| 606 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, | 595 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, |
| 607 DidFailProvisionalLoadWithErrorForError); | 596 DidFailProvisionalLoadWithErrorForError); |
| 608 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, | 597 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, |
| 609 DidFailProvisionalLoadWithErrorForCancellation); | 598 DidFailProvisionalLoadWithErrorForCancellation); |
| 610 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, | 599 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, |
| 611 DontIgnoreBackAfterNavEntryLimit); | 600 DontIgnoreBackAfterNavEntryLimit); |
| 612 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, ImeComposition); | 601 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, ImeComposition); |
| 613 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, InsertCharacters); | 602 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, InsertCharacters); |
| 614 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, JSBlockSentAfterPageLoad); | 603 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, JSBlockSentAfterPageLoad); |
| 615 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, LastCommittedUpdateState); | 604 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, LastCommittedUpdateState); |
| 616 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnHandleKeyboardEvent); | 605 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnHandleKeyboardEvent); |
| 617 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnImeTypeChanged); | 606 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnImeTypeChanged); |
| 618 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnNavStateChanged); | 607 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnNavStateChanged); |
| 619 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnSetAccessibilityMode); | 608 //FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnSetAccessibilityMode); |
|
jam
2014/05/28 23:17:41
remove?
| |
| 620 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnSetTextDirection); | 609 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnSetTextDirection); |
| 621 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnUpdateWebPreferences); | 610 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnUpdateWebPreferences); |
| 622 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, | 611 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, |
| 623 SetEditableSelectionAndComposition); | 612 SetEditableSelectionAndComposition); |
| 624 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, StaleNavigationsIgnored); | 613 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, StaleNavigationsIgnored); |
| 625 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, UpdateTargetURLWithInvalidURL); | 614 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, UpdateTargetURLWithInvalidURL); |
| 626 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, | 615 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, |
| 627 GetCompositionCharacterBoundsTest); | 616 GetCompositionCharacterBoundsTest); |
| 628 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnNavigationHttpPost); | 617 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnNavigationHttpPost); |
| 629 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, | 618 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 734 const std::vector<base::FilePath>& local_paths, | 723 const std::vector<base::FilePath>& local_paths, |
| 735 const base::FilePath& local_directory_name); | 724 const base::FilePath& local_directory_name); |
| 736 void OnMediaPlayerActionAt(const gfx::Point& location, | 725 void OnMediaPlayerActionAt(const gfx::Point& location, |
| 737 const blink::WebMediaPlayerAction& action); | 726 const blink::WebMediaPlayerAction& action); |
| 738 void OnPluginActionAt(const gfx::Point& location, | 727 void OnPluginActionAt(const gfx::Point& location, |
| 739 const blink::WebPluginAction& action); | 728 const blink::WebPluginAction& action); |
| 740 void OnMoveOrResizeStarted(); | 729 void OnMoveOrResizeStarted(); |
| 741 void OnPostMessageEvent(const ViewMsg_PostMessage_Params& params); | 730 void OnPostMessageEvent(const ViewMsg_PostMessage_Params& params); |
| 742 void OnReleaseDisambiguationPopupBitmap(const cc::SharedBitmapId& id); | 731 void OnReleaseDisambiguationPopupBitmap(const cc::SharedBitmapId& id); |
| 743 void OnResetPageEncodingToDefault(); | 732 void OnResetPageEncodingToDefault(); |
| 744 void OnSetAccessibilityMode(AccessibilityMode new_mode); | |
| 745 void OnSetActive(bool active); | 733 void OnSetActive(bool active); |
| 746 void OnSetBackgroundOpaque(bool opaque); | 734 void OnSetBackgroundOpaque(bool opaque); |
| 747 void OnExitFullscreen(); | 735 void OnExitFullscreen(); |
| 748 void OnSetHistoryLengthAndPrune(int history_length, int32 minimum_page_id); | 736 void OnSetHistoryLengthAndPrune(int history_length, int32 minimum_page_id); |
| 749 void OnSetInitialFocus(bool reverse); | 737 void OnSetInitialFocus(bool reverse); |
| 750 void OnSetPageEncoding(const std::string& encoding_name); | 738 void OnSetPageEncoding(const std::string& encoding_name); |
| 751 void OnSetRendererPrefs(const RendererPreferences& renderer_prefs); | 739 void OnSetRendererPrefs(const RendererPreferences& renderer_prefs); |
| 752 void OnSetWebUIProperty(const std::string& name, const std::string& value); | 740 void OnSetWebUIProperty(const std::string& name, const std::string& value); |
| 753 void OnSetZoomLevel(double zoom_level); | 741 void OnSetZoomLevel(double zoom_level); |
| 754 void OnSetZoomLevelForLoadingURL(const GURL& url, double zoom_level); | 742 void OnSetZoomLevelForLoadingURL(const GURL& url, double zoom_level); |
| (...skipping 324 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1205 // use the Observer interface to filter IPC messages and receive frame change | 1186 // use the Observer interface to filter IPC messages and receive frame change |
| 1206 // notifications. | 1187 // notifications. |
| 1207 // --------------------------------------------------------------------------- | 1188 // --------------------------------------------------------------------------- |
| 1208 | 1189 |
| 1209 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); | 1190 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); |
| 1210 }; | 1191 }; |
| 1211 | 1192 |
| 1212 } // namespace content | 1193 } // namespace content |
| 1213 | 1194 |
| 1214 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 1195 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
| OLD | NEW |