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

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

Issue 407493004: Revert of Revert of Migrate accessibility from RenderView to RenderFrame. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_FRAME_IMPL_H_ 5 #ifndef CONTENT_RENDERER_RENDER_FRAME_IMPL_H_
6 #define CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ 6 #define CONTENT_RENDERER_RENDER_FRAME_IMPL_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
12 #include "base/gtest_prod_util.h" 12 #include "base/gtest_prod_util.h"
13 #include "base/id_map.h" 13 #include "base/id_map.h"
14 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
15 #include "base/observer_list.h" 15 #include "base/observer_list.h"
16 #include "base/process/process_handle.h" 16 #include "base/process/process_handle.h"
17 #include "content/common/accessibility_mode_enums.h"
17 #include "content/common/mojo/service_registry_impl.h" 18 #include "content/common/mojo/service_registry_impl.h"
18 #include "content/public/common/javascript_message_type.h" 19 #include "content/public/common/javascript_message_type.h"
19 #include "content/public/common/referrer.h" 20 #include "content/public/common/referrer.h"
20 #include "content/public/renderer/render_frame.h" 21 #include "content/public/renderer/render_frame.h"
21 #include "content/renderer/media/webmediaplayer_delegate.h" 22 #include "content/renderer/media/webmediaplayer_delegate.h"
22 #include "content/renderer/render_frame_proxy.h" 23 #include "content/renderer/render_frame_proxy.h"
23 #include "content/renderer/renderer_webcookiejar_impl.h" 24 #include "content/renderer/renderer_webcookiejar_impl.h"
24 #include "ipc/ipc_message.h" 25 #include "ipc/ipc_message.h"
26 #include "third_party/WebKit/public/web/WebAXObject.h"
25 #include "third_party/WebKit/public/web/WebDataSource.h" 27 #include "third_party/WebKit/public/web/WebDataSource.h"
26 #include "third_party/WebKit/public/web/WebFrameClient.h" 28 #include "third_party/WebKit/public/web/WebFrameClient.h"
27 #include "third_party/WebKit/public/web/WebHistoryCommitType.h" 29 #include "third_party/WebKit/public/web/WebHistoryCommitType.h"
28 #include "ui/gfx/range/range.h" 30 #include "ui/gfx/range/range.h"
29 31
30 #if defined(OS_ANDROID) 32 #if defined(OS_ANDROID)
31 #include "content/renderer/media/android/renderer_media_player_manager.h" 33 #include "content/renderer/media/android/renderer_media_player_manager.h"
32 #endif 34 #endif
33 35
34 class TransportDIB; 36 class TransportDIB;
(...skipping 23 matching lines...) Expand all
58 60
59 class ChildFrameCompositingHelper; 61 class ChildFrameCompositingHelper;
60 class GeolocationDispatcher; 62 class GeolocationDispatcher;
61 class MediaStreamDispatcher; 63 class MediaStreamDispatcher;
62 class MediaStreamImpl; 64 class MediaStreamImpl;
63 class MediaStreamRendererFactory; 65 class MediaStreamRendererFactory;
64 class MidiDispatcher; 66 class MidiDispatcher;
65 class NotificationProvider; 67 class NotificationProvider;
66 class PepperPluginInstanceImpl; 68 class PepperPluginInstanceImpl;
67 class PushMessagingDispatcher; 69 class PushMessagingDispatcher;
70 class RendererAccessibility;
68 class RendererCdmManager; 71 class RendererCdmManager;
69 class RendererMediaPlayerManager; 72 class RendererMediaPlayerManager;
70 class RendererPpapiHost; 73 class RendererPpapiHost;
71 class RenderFrameObserver; 74 class RenderFrameObserver;
72 class RenderViewImpl; 75 class RenderViewImpl;
73 class RenderWidget; 76 class RenderWidget;
74 class RenderWidgetFullscreenPepper; 77 class RenderWidgetFullscreenPepper;
75 class ScreenOrientationDispatcher; 78 class ScreenOrientationDispatcher;
76 struct CustomContextMenuContext; 79 struct CustomContextMenuContext;
77 80
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 // Start/Stop loading notifications. 144 // Start/Stop loading notifications.
142 // TODO(nasko): Those are page-level methods at this time and come from 145 // TODO(nasko): Those are page-level methods at this time and come from
143 // WebViewClient. We should move them to be WebFrameClient calls and put 146 // WebViewClient. We should move them to be WebFrameClient calls and put
144 // logic in the browser side to balance starts/stops. 147 // logic in the browser side to balance starts/stops.
145 // |to_different_document| will be true unless the load is a fragment 148 // |to_different_document| will be true unless the load is a fragment
146 // navigation, or triggered by history.pushState/replaceState. 149 // navigation, or triggered by history.pushState/replaceState.
147 virtual void didStartLoading(bool to_different_document); 150 virtual void didStartLoading(bool to_different_document);
148 virtual void didStopLoading(); 151 virtual void didStopLoading();
149 virtual void didChangeLoadProgress(double load_progress); 152 virtual void didChangeLoadProgress(double load_progress);
150 153
154 AccessibilityMode accessibility_mode() {
155 return accessibility_mode_;
156 }
157
158 RendererAccessibility* renderer_accessibility() {
159 return renderer_accessibility_;
160 }
161
162 void HandleWebAccessibilityEvent(const blink::WebAXObject& obj,
163 blink::WebAXEvent event);
164
165 // TODO(dmazzoni): the only reason this is here is to plumb it through to
166 // RendererAccessibility. It should be part of RenderFrameObserver, once
167 // blink has a separate accessibility tree per frame.
168 void FocusedNodeChanged(const blink::WebNode& node);
169
151 #if defined(ENABLE_PLUGINS) 170 #if defined(ENABLE_PLUGINS)
152 // Notification that a PPAPI plugin has been created. 171 // Notification that a PPAPI plugin has been created.
153 void PepperPluginCreated(RendererPpapiHost* host); 172 void PepperPluginCreated(RendererPpapiHost* host);
154 173
155 // Notifies that |instance| has changed the cursor. 174 // Notifies that |instance| has changed the cursor.
156 // This will update the cursor appearance if it is currently over the plugin 175 // This will update the cursor appearance if it is currently over the plugin
157 // instance. 176 // instance.
158 void PepperDidChangeCursor(PepperPluginInstanceImpl* instance, 177 void PepperDidChangeCursor(PepperPluginInstanceImpl* instance,
159 const blink::WebCursorInfo& cursor); 178 const blink::WebCursorInfo& cursor);
160 179
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 // Binds this render frame's service registry to a handle to the remote 431 // Binds this render frame's service registry to a handle to the remote
413 // service registry. 432 // service registry.
414 void BindServiceRegistry( 433 void BindServiceRegistry(
415 mojo::ScopedMessagePipeHandle service_provider_handle); 434 mojo::ScopedMessagePipeHandle service_provider_handle);
416 435
417 protected: 436 protected:
418 RenderFrameImpl(RenderViewImpl* render_view, int32 routing_id); 437 RenderFrameImpl(RenderViewImpl* render_view, int32 routing_id);
419 438
420 private: 439 private:
421 friend class RenderFrameObserver; 440 friend class RenderFrameObserver;
441 friend class RendererAccessibilityTest;
422 FRIEND_TEST_ALL_PREFIXES(RendererAccessibilityTest, 442 FRIEND_TEST_ALL_PREFIXES(RendererAccessibilityTest,
423 AccessibilityMessagesQueueWhileSwappedOut); 443 AccessibilityMessagesQueueWhileSwappedOut);
424 FRIEND_TEST_ALL_PREFIXES(RenderFrameImplTest, 444 FRIEND_TEST_ALL_PREFIXES(RenderFrameImplTest,
425 ShouldUpdateSelectionTextFromContextMenuParams); 445 ShouldUpdateSelectionTextFromContextMenuParams);
426 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, 446 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest,
427 OnExtendSelectionAndDelete); 447 OnExtendSelectionAndDelete);
428 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, ReloadWhileSwappedOut); 448 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, ReloadWhileSwappedOut);
429 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, SendSwapOutACK); 449 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, SendSwapOutACK);
430 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest, 450 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest,
431 SetEditableSelectionAndComposition); 451 SetEditableSelectionAndComposition);
452 FRIEND_TEST_ALL_PREFIXES(RenderViewImplTest,
453 OnSetAccessibilityMode);
432 454
433 typedef std::map<GURL, double> HostZoomLevels; 455 typedef std::map<GURL, double> HostZoomLevels;
434 456
435 // Functions to add and remove observers for this object. 457 // Functions to add and remove observers for this object.
436 void AddObserver(RenderFrameObserver* observer); 458 void AddObserver(RenderFrameObserver* observer);
437 void RemoveObserver(RenderFrameObserver* observer); 459 void RemoveObserver(RenderFrameObserver* observer);
438 460
439 void UpdateURL(blink::WebFrame* frame); 461 void UpdateURL(blink::WebFrame* frame);
440 462
441 // Gets the focused element. If no such element exists then the element will 463 // Gets the focused element. If no such element exists then the element will
(...skipping 27 matching lines...) Expand all
469 int id, 491 int id,
470 bool notify_result); 492 bool notify_result);
471 void OnSetEditableSelectionOffsets(int start, int end); 493 void OnSetEditableSelectionOffsets(int start, int end);
472 void OnSetCompositionFromExistingText( 494 void OnSetCompositionFromExistingText(
473 int start, int end, 495 int start, int end,
474 const std::vector<blink::WebCompositionUnderline>& underlines); 496 const std::vector<blink::WebCompositionUnderline>& underlines);
475 void OnExtendSelectionAndDelete(int before, int after); 497 void OnExtendSelectionAndDelete(int before, int after);
476 void OnReload(bool ignore_cache); 498 void OnReload(bool ignore_cache);
477 void OnTextSurroundingSelectionRequest(size_t max_length); 499 void OnTextSurroundingSelectionRequest(size_t max_length);
478 void OnAddStyleSheetByURL(const std::string& url); 500 void OnAddStyleSheetByURL(const std::string& url);
501 void OnSetAccessibilityMode(AccessibilityMode new_mode);
479 #if defined(OS_MACOSX) 502 #if defined(OS_MACOSX)
480 void OnCopyToFindPboard(); 503 void OnCopyToFindPboard();
481 #endif 504 #endif
482 505
483 // Virtual since overridden by WebTestProxy for layout tests. 506 // Virtual since overridden by WebTestProxy for layout tests.
484 virtual blink::WebNavigationPolicy DecidePolicyForNavigation( 507 virtual blink::WebNavigationPolicy DecidePolicyForNavigation(
485 RenderFrame* render_frame, 508 RenderFrame* render_frame,
486 blink::WebFrame* frame, 509 blink::WebFrame* frame,
487 blink::WebDataSource::ExtraData* extraData, 510 blink::WebDataSource::ExtraData* extraData,
488 const blink::WebURLRequest& request, 511 const blink::WebURLRequest& request,
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 680
658 // The push messaging dispatcher attached to this frame, lazily initialized. 681 // The push messaging dispatcher attached to this frame, lazily initialized.
659 PushMessagingDispatcher* push_messaging_dispatcher_; 682 PushMessagingDispatcher* push_messaging_dispatcher_;
660 683
661 ServiceRegistryImpl service_registry_; 684 ServiceRegistryImpl service_registry_;
662 685
663 // The screen orientation dispatcher attached to the frame, lazily 686 // The screen orientation dispatcher attached to the frame, lazily
664 // initialized. 687 // initialized.
665 ScreenOrientationDispatcher* screen_orientation_dispatcher_; 688 ScreenOrientationDispatcher* screen_orientation_dispatcher_;
666 689
690 // The current accessibility mode.
691 AccessibilityMode accessibility_mode_;
692
693 // Only valid if |accessibility_mode_| is anything other than
694 // AccessibilityModeOff.
695 RendererAccessibility* renderer_accessibility_;
696
667 base::WeakPtrFactory<RenderFrameImpl> weak_factory_; 697 base::WeakPtrFactory<RenderFrameImpl> weak_factory_;
668 698
669 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl); 699 DISALLOW_COPY_AND_ASSIGN(RenderFrameImpl);
670 }; 700 };
671 701
672 } // namespace content 702 } // namespace content
673 703
674 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_ 704 #endif // CONTENT_RENDERER_RENDER_FRAME_IMPL_H_
OLDNEW
« no previous file with comments | « content/renderer/accessibility/renderer_accessibility_focus_only.cc ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698