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

Side by Side Diff: content/browser/frame_host/render_frame_host_delegate.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 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_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_
6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_
7 7
8 #include <vector>
9
8 #include "base/basictypes.h" 10 #include "base/basictypes.h"
9 #include "base/i18n/rtl.h" 11 #include "base/i18n/rtl.h"
10 #include "content/common/content_export.h" 12 #include "content/common/content_export.h"
13 #include "content/common/frame_message_enums.h"
11 #include "content/public/common/javascript_message_type.h" 14 #include "content/public/common/javascript_message_type.h"
12 15
16 #if defined(OS_WIN)
17 #include "ui/gfx/native_widget_types.h"
18 #endif
19
13 class GURL; 20 class GURL;
14 21
15 namespace IPC { 22 namespace IPC {
16 class Message; 23 class Message;
17 } 24 }
18 25
19 namespace content { 26 namespace content {
20 class RenderFrameHost; 27 class RenderFrameHost;
21 class WebContents; 28 class WebContents;
29 struct AXEventNotificationDetails;
22 struct ContextMenuParams; 30 struct ContextMenuParams;
23 31
24 // An interface implemented by an object interested in knowing about the state 32 // An interface implemented by an object interested in knowing about the state
25 // of the RenderFrameHost. 33 // of the RenderFrameHost.
26 class CONTENT_EXPORT RenderFrameHostDelegate { 34 class CONTENT_EXPORT RenderFrameHostDelegate {
27 public: 35 public:
28 // This is used to give the delegate a chance to filter IPC messages. 36 // This is used to give the delegate a chance to filter IPC messages.
29 virtual bool OnMessageReceived(RenderFrameHost* render_frame_host, 37 virtual bool OnMessageReceived(RenderFrameHost* render_frame_host,
30 const IPC::Message& message); 38 const IPC::Message& message);
31 39
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 112
105 // The page's encoding was changed and should be updated. Only called for the 113 // The page's encoding was changed and should be updated. Only called for the
106 // top-level frame. 114 // top-level frame.
107 virtual void UpdateEncoding(RenderFrameHost* render_frame_host, 115 virtual void UpdateEncoding(RenderFrameHost* render_frame_host,
108 const std::string& encoding) {} 116 const std::string& encoding) {}
109 117
110 // Return this object cast to a WebContents, if it is one. If the object is 118 // Return this object cast to a WebContents, if it is one. If the object is
111 // not a WebContents, returns NULL. 119 // not a WebContents, returns NULL.
112 virtual WebContents* GetAsWebContents(); 120 virtual WebContents* GetAsWebContents();
113 121
122 // Get the accessibility mode for the WebContents that owns this frame.
David Tseng 2014/07/14 19:08:01 this frame delegate's frame?
dmazzoni 2014/07/15 07:55:03 I'm not sure what you mean? The WebContents is who
123 virtual AccessibilityMode GetAccessibilityMode() const;
David Tseng 2014/07/14 19:08:01 Does it make sense to have this on the delegate? S
dmazzoni 2014/07/15 07:55:03 WebContentsImpl is the class that implements Rende
124
125 // Invoked when an accessibility event is received from the renderer.
126 virtual void AccessibilityEventReceived(
127 const std::vector<AXEventNotificationDetails>& details) {}
128
129 #if defined(OS_WIN)
David Tseng 2014/07/14 19:08:01 Why only on Win? Do we need anything for Mac as we
dmazzoni 2014/07/15 07:55:03 It's complicated - basically the parent native vie
130 // Returns the frame's parent's NativeViewAccessible.
131 virtual gfx::NativeViewAccessible GetParentNativeViewAccessible();
132 #endif
133
114 protected: 134 protected:
115 virtual ~RenderFrameHostDelegate() {} 135 virtual ~RenderFrameHostDelegate() {}
116 }; 136 };
117 137
118 } // namespace content 138 } // namespace content
119 139
120 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_ 140 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698