Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
| 12 #include "content/common/frame_message_enums.h" | |
| 10 #include "content/public/common/javascript_message_type.h" | 13 #include "content/public/common/javascript_message_type.h" |
| 11 | 14 |
| 15 #if defined(OS_WIN) | |
| 16 #include "ui/gfx/native_widget_types.h" | |
| 17 #endif | |
| 18 | |
| 12 class GURL; | 19 class GURL; |
| 13 | 20 |
| 14 namespace IPC { | 21 namespace IPC { |
| 15 class Message; | 22 class Message; |
| 16 } | 23 } |
| 17 | 24 |
| 18 namespace content { | 25 namespace content { |
| 19 class RenderFrameHost; | 26 class RenderFrameHost; |
| 20 class WebContents; | 27 class WebContents; |
| 28 struct AXEventNotificationDetails; | |
| 21 struct ContextMenuParams; | 29 struct ContextMenuParams; |
| 22 | 30 |
| 23 // An interface implemented by an object interested in knowing about the state | 31 // An interface implemented by an object interested in knowing about the state |
| 24 // of the RenderFrameHost. | 32 // of the RenderFrameHost. |
| 25 class CONTENT_EXPORT RenderFrameHostDelegate { | 33 class CONTENT_EXPORT RenderFrameHostDelegate { |
| 26 public: | 34 public: |
| 27 // This is used to give the delegate a chance to filter IPC messages. | 35 // This is used to give the delegate a chance to filter IPC messages. |
| 28 virtual bool OnMessageReceived(RenderFrameHost* render_frame_host, | 36 virtual bool OnMessageReceived(RenderFrameHost* render_frame_host, |
| 29 const IPC::Message& message); | 37 const IPC::Message& message); |
| 30 | 38 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 88 virtual void DidDisownOpener(RenderFrameHost* render_frame_host) {} | 96 virtual void DidDisownOpener(RenderFrameHost* render_frame_host) {} |
| 89 | 97 |
| 90 // The onload handler in the frame has completed. Only called for the top- | 98 // The onload handler in the frame has completed. Only called for the top- |
| 91 // level frame. | 99 // level frame. |
| 92 virtual void DocumentOnLoadCompleted(RenderFrameHost* render_frame_host) {} | 100 virtual void DocumentOnLoadCompleted(RenderFrameHost* render_frame_host) {} |
| 93 | 101 |
| 94 // Return this object cast to a WebContents, if it is one. If the object is | 102 // Return this object cast to a WebContents, if it is one. If the object is |
| 95 // not a WebContents, returns NULL. | 103 // not a WebContents, returns NULL. |
| 96 virtual WebContents* GetAsWebContents(); | 104 virtual WebContents* GetAsWebContents(); |
| 97 | 105 |
| 106 // Get the accessibility mode for all frames in this WebContents. | |
|
nasko
2014/05/12 17:28:01
nit: This wording reads as though it will return t
dmazzoni
2014/05/13 06:36:52
Good point. I clarified the wording.
| |
| 107 virtual AccessibilityMode GetAccessibilityMode() const; | |
| 108 | |
| 109 // Invoked when an accessibility event is received from the renderer. | |
| 110 virtual void AccessibilityEventReceived( | |
| 111 const std::vector<AXEventNotificationDetails>& details) {} | |
| 112 | |
| 113 #if defined(OS_WIN) | |
| 114 // Returns the frame's parent's NativeViewAccessible. | |
| 115 virtual gfx::NativeViewAccessible GetParentNativeViewAccessible(); | |
| 116 #endif | |
| 117 | |
| 98 protected: | 118 protected: |
| 99 virtual ~RenderFrameHostDelegate() {} | 119 virtual ~RenderFrameHostDelegate() {} |
| 100 }; | 120 }; |
| 101 | 121 |
| 102 } // namespace content | 122 } // namespace content |
| 103 | 123 |
| 104 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_ | 124 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_ |
| OLD | NEW |