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

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

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