| 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 "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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 | 105 |
| 98 // The page's encoding was changed and should be updated. Only called for the | 106 // The page's encoding was changed and should be updated. Only called for the |
| 99 // top-level frame. | 107 // top-level frame. |
| 100 virtual void UpdateEncoding(RenderFrameHost* render_frame_host, | 108 virtual void UpdateEncoding(RenderFrameHost* render_frame_host, |
| 101 const std::string& encoding) {} | 109 const std::string& encoding) {} |
| 102 | 110 |
| 103 // Return this object cast to a WebContents, if it is one. If the object is | 111 // Return this object cast to a WebContents, if it is one. If the object is |
| 104 // not a WebContents, returns NULL. | 112 // not a WebContents, returns NULL. |
| 105 virtual WebContents* GetAsWebContents(); | 113 virtual WebContents* GetAsWebContents(); |
| 106 | 114 |
| 115 // Get the accessibility mode for the WebContents that owns this frame. |
| 116 virtual AccessibilityMode GetAccessibilityMode() const; |
| 117 |
| 118 // Invoked when an accessibility event is received from the renderer. |
| 119 virtual void AccessibilityEventReceived( |
| 120 const std::vector<AXEventNotificationDetails>& details) {} |
| 121 |
| 122 #if defined(OS_WIN) |
| 123 // Returns the frame's parent's NativeViewAccessible. |
| 124 virtual gfx::NativeViewAccessible GetParentNativeViewAccessible(); |
| 125 #endif |
| 126 |
| 107 protected: | 127 protected: |
| 108 virtual ~RenderFrameHostDelegate() {} | 128 virtual ~RenderFrameHostDelegate() {} |
| 109 }; | 129 }; |
| 110 | 130 |
| 111 } // namespace content | 131 } // namespace content |
| 112 | 132 |
| 113 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_ | 133 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_HOST_DELEGATE_H_ |
| OLD | NEW |