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

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

Issue 273423004: Migrate accessibility from RenderView to RenderFrame. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 5 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 | Annotate | Revision Log
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 <deque> 8 #include <deque>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 class HistoryController; 133 class HistoryController;
134 class HistoryEntry; 134 class HistoryEntry;
135 class ImageResourceFetcher; 135 class ImageResourceFetcher;
136 class MediaStreamDispatcher; 136 class MediaStreamDispatcher;
137 class MouseLockDispatcher; 137 class MouseLockDispatcher;
138 class NavigationState; 138 class NavigationState;
139 class PepperPluginInstanceImpl; 139 class PepperPluginInstanceImpl;
140 class RenderViewImplTest; 140 class RenderViewImplTest;
141 class RenderViewObserver; 141 class RenderViewObserver;
142 class RenderViewTest; 142 class RenderViewTest;
143 class RendererAccessibility;
144 class RendererDateTimePicker; 143 class RendererDateTimePicker;
145 class RendererWebColorChooserImpl; 144 class RendererWebColorChooserImpl;
146 class SpeechRecognitionDispatcher; 145 class SpeechRecognitionDispatcher;
147 class WebPluginDelegateProxy; 146 class WebPluginDelegateProxy;
148 struct DropData; 147 struct DropData;
149 struct FaviconURL; 148 struct FaviconURL;
150 struct FileChooserParams; 149 struct FileChooserParams;
151 struct RenderViewImplParams; 150 struct RenderViewImplParams;
152 151
153 #if defined(OS_ANDROID) 152 #if defined(OS_ANDROID)
(...skipping 25 matching lines...) Expand all
179 int32 main_frame_routing_id, 178 int32 main_frame_routing_id,
180 int32 surface_id, 179 int32 surface_id,
181 int64 session_storage_namespace_id, 180 int64 session_storage_namespace_id,
182 const base::string16& frame_name, 181 const base::string16& frame_name,
183 bool is_renderer_created, 182 bool is_renderer_created,
184 bool swapped_out, 183 bool swapped_out,
185 int32 proxy_routing_id, 184 int32 proxy_routing_id,
186 bool hidden, 185 bool hidden,
187 bool never_visible, 186 bool never_visible,
188 int32 next_page_id, 187 int32 next_page_id,
189 const blink::WebScreenInfo& screen_info, 188 const blink::WebScreenInfo& screen_info);
190 AccessibilityMode accessibility_mode);
191 189
192 // Used by content_layouttest_support to hook into the creation of 190 // Used by content_layouttest_support to hook into the creation of
193 // RenderViewImpls. 191 // RenderViewImpls.
194 static void InstallCreateHook( 192 static void InstallCreateHook(
195 RenderViewImpl* (*create_render_view_impl)(RenderViewImplParams*)); 193 RenderViewImpl* (*create_render_view_impl)(RenderViewImplParams*));
196 194
197 // Returns the RenderViewImpl containing the given WebView. 195 // Returns the RenderViewImpl containing the given WebView.
198 static RenderViewImpl* FromWebView(blink::WebView* webview); 196 static RenderViewImpl* FromWebView(blink::WebView* webview);
199 197
200 // Returns the RenderViewImpl for the given routing ID. 198 // Returns the RenderViewImpl for the given routing ID.
(...skipping 18 matching lines...) Expand all
219 send_content_state_immediately_ = value; 217 send_content_state_immediately_ = value;
220 } 218 }
221 219
222 RenderFrameImpl* main_render_frame() { return main_render_frame_.get(); } 220 RenderFrameImpl* main_render_frame() { return main_render_frame_.get(); }
223 221
224 // TODO(jam): move to RenderFrameImpl 222 // TODO(jam): move to RenderFrameImpl
225 MediaStreamDispatcher* media_stream_dispatcher() { 223 MediaStreamDispatcher* media_stream_dispatcher() {
226 return media_stream_dispatcher_; 224 return media_stream_dispatcher_;
227 } 225 }
228 226
229 AccessibilityMode accessibility_mode() {
230 return accessibility_mode_;
231 }
232
233 RendererAccessibility* renderer_accessibility() {
234 return renderer_accessibility_;
235 }
236
237 MouseLockDispatcher* mouse_lock_dispatcher() { 227 MouseLockDispatcher* mouse_lock_dispatcher() {
238 return mouse_lock_dispatcher_; 228 return mouse_lock_dispatcher_;
239 } 229 }
240 230
241 HistoryController* history_controller() { 231 HistoryController* history_controller() {
242 return history_controller_.get(); 232 return history_controller_.get();
243 } 233 }
244 234
245 // Lazily initialize this view's BrowserPluginManager and return it. 235 // Lazily initialize this view's BrowserPluginManager and return it.
246 BrowserPluginManager* GetBrowserPluginManager(); 236 BrowserPluginManager* GetBrowserPluginManager();
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 const gfx::Point& root_layer_offset, 559 const gfx::Point& root_layer_offset,
570 float root_layer_scale) OVERRIDE; 560 float root_layer_scale) OVERRIDE;
571 561
572 // Do not delete directly. This class is reference counted. 562 // Do not delete directly. This class is reference counted.
573 virtual ~RenderViewImpl(); 563 virtual ~RenderViewImpl();
574 564
575 private: 565 private:
576 // For unit tests. 566 // For unit tests.
577 friend class ExternalPopupMenuTest; 567 friend class ExternalPopupMenuTest;
578 friend class PepperDeviceTest; 568 friend class PepperDeviceTest;
579 friend class RendererAccessibilityTest;
580 friend class RenderViewImplTest; 569 friend class RenderViewImplTest;
581 friend class RenderViewTest; 570 friend class RenderViewTest;
571 friend class RendererAccessibilityTest;
582 572
583 // TODO(nasko): Temporarily friend RenderFrameImpl, so we don't duplicate 573 // TODO(nasko): Temporarily friend RenderFrameImpl, so we don't duplicate
584 // utility functions needed in both classes, while we move frame specific 574 // utility functions needed in both classes, while we move frame specific
585 // code away from this class. 575 // code away from this class.
586 friend class RenderFrameImpl; 576 friend class RenderFrameImpl;
587 577
588 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuRemoveTest, RemoveOnChange); 578 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuRemoveTest, RemoveOnChange);
589 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, NormalCase); 579 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, NormalCase);
590 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, ShowPopupThenNavigate); 580 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, ShowPopupThenNavigate);
591 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, DecideNavigationPolicyForWebUI); 581 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, DecideNavigationPolicyForWebUI);
592 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, 582 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest,
593 DidFailProvisionalLoadWithErrorForError); 583 DidFailProvisionalLoadWithErrorForError);
594 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, 584 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest,
595 DidFailProvisionalLoadWithErrorForCancellation); 585 DidFailProvisionalLoadWithErrorForCancellation);
596 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, 586 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest,
597 DontIgnoreBackAfterNavEntryLimit); 587 DontIgnoreBackAfterNavEntryLimit);
598 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, ImeComposition); 588 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, ImeComposition);
599 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, InsertCharacters); 589 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, InsertCharacters);
600 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, JSBlockSentAfterPageLoad); 590 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, JSBlockSentAfterPageLoad);
601 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, LastCommittedUpdateState); 591 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, LastCommittedUpdateState);
602 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnHandleKeyboardEvent); 592 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnHandleKeyboardEvent);
603 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnImeTypeChanged); 593 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnImeTypeChanged);
604 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnNavStateChanged); 594 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnNavStateChanged);
605 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnSetAccessibilityMode); 595 //FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnSetAccessibilityMode);
ncarter (slow) 2014/07/15 01:23:29 Just delete this line?
dmazzoni 2014/07/15 07:55:04 Thanks, done.
606 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnSetTextDirection); 596 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnSetTextDirection);
607 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnUpdateWebPreferences); 597 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnUpdateWebPreferences);
608 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, 598 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest,
609 SetEditableSelectionAndComposition); 599 SetEditableSelectionAndComposition);
610 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, StaleNavigationsIgnored); 600 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, StaleNavigationsIgnored);
611 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, UpdateTargetURLWithInvalidURL); 601 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, UpdateTargetURLWithInvalidURL);
612 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, 602 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest,
613 GetCompositionCharacterBoundsTest); 603 GetCompositionCharacterBoundsTest);
614 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnNavigationHttpPost); 604 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnNavigationHttpPost);
615 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, 605 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest,
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 const std::vector<base::FilePath>& local_paths, 710 const std::vector<base::FilePath>& local_paths,
721 const base::FilePath& local_directory_name); 711 const base::FilePath& local_directory_name);
722 void OnMediaPlayerActionAt(const gfx::Point& location, 712 void OnMediaPlayerActionAt(const gfx::Point& location,
723 const blink::WebMediaPlayerAction& action); 713 const blink::WebMediaPlayerAction& action);
724 void OnPluginActionAt(const gfx::Point& location, 714 void OnPluginActionAt(const gfx::Point& location,
725 const blink::WebPluginAction& action); 715 const blink::WebPluginAction& action);
726 void OnMoveOrResizeStarted(); 716 void OnMoveOrResizeStarted();
727 void OnPostMessageEvent(const ViewMsg_PostMessage_Params& params); 717 void OnPostMessageEvent(const ViewMsg_PostMessage_Params& params);
728 void OnReleaseDisambiguationPopupBitmap(const cc::SharedBitmapId& id); 718 void OnReleaseDisambiguationPopupBitmap(const cc::SharedBitmapId& id);
729 void OnResetPageEncodingToDefault(); 719 void OnResetPageEncodingToDefault();
730 void OnSetAccessibilityMode(AccessibilityMode new_mode);
731 void OnSetActive(bool active); 720 void OnSetActive(bool active);
732 void OnSetBackgroundOpaque(bool opaque); 721 void OnSetBackgroundOpaque(bool opaque);
733 void OnExitFullscreen(); 722 void OnExitFullscreen();
734 void OnSetHistoryLengthAndPrune(int history_length, int32 minimum_page_id); 723 void OnSetHistoryLengthAndPrune(int history_length, int32 minimum_page_id);
735 void OnSetInitialFocus(bool reverse); 724 void OnSetInitialFocus(bool reverse);
736 void OnSetPageEncoding(const std::string& encoding_name); 725 void OnSetPageEncoding(const std::string& encoding_name);
737 void OnSetRendererPrefs(const RendererPreferences& renderer_prefs); 726 void OnSetRendererPrefs(const RendererPreferences& renderer_prefs);
738 void OnSetWebUIProperty(const std::string& name, const std::string& value); 727 void OnSetWebUIProperty(const std::string& name, const std::string& value);
739 void OnSetZoomLevelForLoadingURL(const GURL& url, double zoom_level); 728 void OnSetZoomLevelForLoadingURL(const GURL& url, double zoom_level);
740 void OnSetZoomLevelForView(bool uses_temporary_zoom_level, double level); 729 void OnSetZoomLevelForView(bool uses_temporary_zoom_level, double level);
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
1044 SpeechRecognitionDispatcher* speech_recognition_dispatcher_; 1033 SpeechRecognitionDispatcher* speech_recognition_dispatcher_;
1045 1034
1046 // MediaStream dispatcher attached to this view; lazily initialized. 1035 // MediaStream dispatcher attached to this view; lazily initialized.
1047 MediaStreamDispatcher* media_stream_dispatcher_; 1036 MediaStreamDispatcher* media_stream_dispatcher_;
1048 1037
1049 // BrowserPluginManager attached to this view; lazily initialized. 1038 // BrowserPluginManager attached to this view; lazily initialized.
1050 scoped_refptr<BrowserPluginManager> browser_plugin_manager_; 1039 scoped_refptr<BrowserPluginManager> browser_plugin_manager_;
1051 1040
1052 DevToolsAgent* devtools_agent_; 1041 DevToolsAgent* devtools_agent_;
1053 1042
1054 // The current accessibility mode.
1055 AccessibilityMode accessibility_mode_;
1056
1057 // Only valid if |accessibility_mode_| is anything other than
1058 // AccessibilityModeOff.
1059 RendererAccessibility* renderer_accessibility_;
1060
1061 // Mouse Lock dispatcher attached to this view. 1043 // Mouse Lock dispatcher attached to this view.
1062 MouseLockDispatcher* mouse_lock_dispatcher_; 1044 MouseLockDispatcher* mouse_lock_dispatcher_;
1063 1045
1064 scoped_ptr<HistoryController> history_controller_; 1046 scoped_ptr<HistoryController> history_controller_;
1065 1047
1066 #if defined(OS_ANDROID) 1048 #if defined(OS_ANDROID)
1067 // Android Specific --------------------------------------------------------- 1049 // Android Specific ---------------------------------------------------------
1068 1050
1069 // Expected id of the next content intent launched. Used to prevent scheduled 1051 // Expected id of the next content intent launched. Used to prevent scheduled
1070 // intents to be launched if aborted. 1052 // intents to be launched if aborted.
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
1170 // use the Observer interface to filter IPC messages and receive frame change 1152 // use the Observer interface to filter IPC messages and receive frame change
1171 // notifications. 1153 // notifications.
1172 // --------------------------------------------------------------------------- 1154 // ---------------------------------------------------------------------------
1173 1155
1174 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); 1156 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl);
1175 }; 1157 };
1176 1158
1177 } // namespace content 1159 } // namespace content
1178 1160
1179 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ 1161 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698