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

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: Created 6 years, 7 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
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 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 const gfx::Point& root_layer_offset, 568 const gfx::Point& root_layer_offset,
579 float root_layer_scale) OVERRIDE; 569 float root_layer_scale) OVERRIDE;
580 570
581 // Do not delete directly. This class is reference counted. 571 // Do not delete directly. This class is reference counted.
582 virtual ~RenderViewImpl(); 572 virtual ~RenderViewImpl();
583 573
584 private: 574 private:
585 // For unit tests. 575 // For unit tests.
586 friend class ExternalPopupMenuTest; 576 friend class ExternalPopupMenuTest;
587 friend class PepperDeviceTest; 577 friend class PepperDeviceTest;
588 friend class RendererAccessibilityTest;
589 friend class RenderViewTest; 578 friend class RenderViewTest;
590 579
591 // TODO(nasko): Temporarily friend RenderFrameImpl, so we don't duplicate 580 // TODO(nasko): Temporarily friend RenderFrameImpl, so we don't duplicate
592 // utility functions needed in both classes, while we move frame specific 581 // utility functions needed in both classes, while we move frame specific
593 // code away from this class. 582 // code away from this class.
594 friend class RenderFrameImpl; 583 friend class RenderFrameImpl;
595 584
596 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuRemoveTest, RemoveOnChange); 585 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuRemoveTest, RemoveOnChange);
597 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, NormalCase); 586 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, NormalCase);
598 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, ShowPopupThenNavigate); 587 FRIEND_TEST_ALL_PREFIXES(ExternalPopupMenuTest, ShowPopupThenNavigate);
599 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, DecideNavigationPolicyForWebUI); 588 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, DecideNavigationPolicyForWebUI);
600 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, 589 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest,
601 DidFailProvisionalLoadWithErrorForError); 590 DidFailProvisionalLoadWithErrorForError);
602 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, 591 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest,
603 DidFailProvisionalLoadWithErrorForCancellation); 592 DidFailProvisionalLoadWithErrorForCancellation);
604 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, 593 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest,
605 DontIgnoreBackAfterNavEntryLimit); 594 DontIgnoreBackAfterNavEntryLimit);
606 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, ImeComposition); 595 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, ImeComposition);
607 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, InsertCharacters); 596 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, InsertCharacters);
608 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, JSBlockSentAfterPageLoad); 597 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, JSBlockSentAfterPageLoad);
609 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, LastCommittedUpdateState); 598 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, LastCommittedUpdateState);
610 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnHandleKeyboardEvent); 599 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnHandleKeyboardEvent);
611 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnImeTypeChanged); 600 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnImeTypeChanged);
612 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnNavStateChanged); 601 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnNavStateChanged);
613 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnSetAccessibilityMode); 602 //FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnSetAccessibilityMode);
614 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnSetTextDirection); 603 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnSetTextDirection);
615 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnUpdateWebPreferences); 604 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnUpdateWebPreferences);
616 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, 605 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest,
617 SetEditableSelectionAndComposition); 606 SetEditableSelectionAndComposition);
618 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, StaleNavigationsIgnored); 607 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, StaleNavigationsIgnored);
619 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, UpdateTargetURLWithInvalidURL); 608 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, UpdateTargetURLWithInvalidURL);
620 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, 609 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest,
621 GetCompositionCharacterBoundsTest); 610 GetCompositionCharacterBoundsTest);
622 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnNavigationHttpPost); 611 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, OnNavigationHttpPost);
623 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, 612 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest,
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 const base::FilePath& local_directory_name); 739 const base::FilePath& local_directory_name);
751 void OnMediaPlayerActionAt(const gfx::Point& location, 740 void OnMediaPlayerActionAt(const gfx::Point& location,
752 const blink::WebMediaPlayerAction& action); 741 const blink::WebMediaPlayerAction& action);
753 void OnOrientationChangeEvent(int orientation); 742 void OnOrientationChangeEvent(int orientation);
754 void OnPluginActionAt(const gfx::Point& location, 743 void OnPluginActionAt(const gfx::Point& location,
755 const blink::WebPluginAction& action); 744 const blink::WebPluginAction& action);
756 void OnMoveOrResizeStarted(); 745 void OnMoveOrResizeStarted();
757 void OnPostMessageEvent(const ViewMsg_PostMessage_Params& params); 746 void OnPostMessageEvent(const ViewMsg_PostMessage_Params& params);
758 void OnReleaseDisambiguationPopupBitmap(const cc::SharedBitmapId& id); 747 void OnReleaseDisambiguationPopupBitmap(const cc::SharedBitmapId& id);
759 void OnResetPageEncodingToDefault(); 748 void OnResetPageEncodingToDefault();
760 void OnSetAccessibilityMode(AccessibilityMode new_mode);
761 void OnSetActive(bool active); 749 void OnSetActive(bool active);
762 void OnSetBackground(const SkBitmap& background); 750 void OnSetBackground(const SkBitmap& background);
763 void OnExitFullscreen(); 751 void OnExitFullscreen();
764 void OnSetHistoryLengthAndPrune(int history_length, int32 minimum_page_id); 752 void OnSetHistoryLengthAndPrune(int history_length, int32 minimum_page_id);
765 void OnSetInitialFocus(bool reverse); 753 void OnSetInitialFocus(bool reverse);
766 void OnSetPageEncoding(const std::string& encoding_name); 754 void OnSetPageEncoding(const std::string& encoding_name);
767 void OnSetRendererPrefs(const RendererPreferences& renderer_prefs); 755 void OnSetRendererPrefs(const RendererPreferences& renderer_prefs);
768 void OnSetWebUIProperty(const std::string& name, const std::string& value); 756 void OnSetWebUIProperty(const std::string& name, const std::string& value);
769 void OnSetZoomLevel(double zoom_level); 757 void OnSetZoomLevel(double zoom_level);
770 void OnSetZoomLevelForLoadingURL(const GURL& url, double zoom_level); 758 void OnSetZoomLevelForLoadingURL(const GURL& url, double zoom_level);
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
1101 MediaStreamDispatcher* media_stream_dispatcher_; 1089 MediaStreamDispatcher* media_stream_dispatcher_;
1102 1090
1103 // BrowserPluginManager attached to this view; lazily initialized. 1091 // BrowserPluginManager attached to this view; lazily initialized.
1104 scoped_refptr<BrowserPluginManager> browser_plugin_manager_; 1092 scoped_refptr<BrowserPluginManager> browser_plugin_manager_;
1105 1093
1106 // MidiClient attached to this view; lazily initialized. 1094 // MidiClient attached to this view; lazily initialized.
1107 MidiDispatcher* midi_dispatcher_; 1095 MidiDispatcher* midi_dispatcher_;
1108 1096
1109 DevToolsAgent* devtools_agent_; 1097 DevToolsAgent* devtools_agent_;
1110 1098
1111 // The current accessibility mode.
1112 AccessibilityMode accessibility_mode_;
1113
1114 // Only valid if |accessibility_mode_| is anything other than
1115 // AccessibilityModeOff.
1116 RendererAccessibility* renderer_accessibility_;
1117
1118 // Mouse Lock dispatcher attached to this view. 1099 // Mouse Lock dispatcher attached to this view.
1119 MouseLockDispatcher* mouse_lock_dispatcher_; 1100 MouseLockDispatcher* mouse_lock_dispatcher_;
1120 1101
1121 scoped_ptr<HistoryController> history_controller_; 1102 scoped_ptr<HistoryController> history_controller_;
1122 1103
1123 #if defined(OS_ANDROID) 1104 #if defined(OS_ANDROID)
1124 // Android Specific --------------------------------------------------------- 1105 // Android Specific ---------------------------------------------------------
1125 1106
1126 // Expected id of the next content intent launched. Used to prevent scheduled 1107 // Expected id of the next content intent launched. Used to prevent scheduled
1127 // intents to be launched if aborted. 1108 // intents to be launched if aborted.
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
1234 // use the Observer interface to filter IPC messages and receive frame change 1215 // use the Observer interface to filter IPC messages and receive frame change
1235 // notifications. 1216 // notifications.
1236 // --------------------------------------------------------------------------- 1217 // ---------------------------------------------------------------------------
1237 1218
1238 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); 1219 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl);
1239 }; 1220 };
1240 1221
1241 } // namespace content 1222 } // namespace content
1242 1223
1243 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ 1224 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698