| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 class Rect; | 28 class Rect; |
| 29 class Size; | 29 class Size; |
| 30 } | 30 } |
| 31 | 31 |
| 32 namespace content { | 32 namespace content { |
| 33 | 33 |
| 34 class BrowserContext; | 34 class BrowserContext; |
| 35 class FrameTree; | 35 class FrameTree; |
| 36 class PageState; | 36 class PageState; |
| 37 class RenderViewHost; | 37 class RenderViewHost; |
| 38 class RenderViewHostImpl; |
| 38 class RenderViewHostDelegateView; | 39 class RenderViewHostDelegateView; |
| 39 class SessionStorageNamespace; | 40 class SessionStorageNamespace; |
| 40 class SiteInstance; | 41 class SiteInstance; |
| 41 class WebContents; | 42 class WebContents; |
| 42 struct RendererPreferences; | 43 struct RendererPreferences; |
| 43 | 44 |
| 44 namespace mojom { | 45 namespace mojom { |
| 45 class CreateNewWindowParams; | 46 class CreateNewWindowParams; |
| 46 } | 47 } |
| 47 | 48 |
| 48 // | 49 // |
| 49 // RenderViewHostDelegate | 50 // RenderViewHostDelegate |
| 50 // | 51 // |
| 51 // An interface implemented by an object interested in knowing about the state | 52 // An interface implemented by an object interested in knowing about the state |
| 52 // of the RenderViewHost. | 53 // of the RenderViewHost. |
| 53 // | 54 // |
| 54 // This interface currently encompasses every type of message that was | 55 // This interface currently encompasses every type of message that was |
| 55 // previously being sent by WebContents itself. Some of these notifications | 56 // previously being sent by WebContents itself. Some of these notifications |
| 56 // may not be relevant to all users of RenderViewHost and we should consider | 57 // may not be relevant to all users of RenderViewHost and we should consider |
| 57 // exposing a more generic Send function on RenderViewHost and a response | 58 // exposing a more generic Send function on RenderViewHost and a response |
| 58 // listener here to serve that need. | 59 // listener here to serve that need. |
| 59 class CONTENT_EXPORT RenderViewHostDelegate { | 60 class CONTENT_EXPORT RenderViewHostDelegate { |
| 60 public: | 61 public: |
| 61 // Returns the current delegate associated with a feature. May return NULL if | 62 // Returns the current delegate associated with a feature. May return NULL if |
| 62 // there is no corresponding delegate. | 63 // there is no corresponding delegate. |
| 63 virtual RenderViewHostDelegateView* GetDelegateView(); | 64 virtual RenderViewHostDelegateView* GetDelegateView(); |
| 64 | 65 |
| 65 // This is used to give the delegate a chance to filter IPC messages. | 66 // This is used to give the delegate a chance to filter IPC messages. |
| 66 virtual bool OnMessageReceived(RenderViewHost* render_view_host, | 67 virtual bool OnMessageReceived(RenderViewHostImpl* render_view_host, |
| 67 const IPC::Message& message); | 68 const IPC::Message& message); |
| 68 | 69 |
| 69 // Return this object cast to a WebContents, if it is one. If the object is | 70 // Return this object cast to a WebContents, if it is one. If the object is |
| 70 // not a WebContents, returns NULL. DEPRECATED: Be sure to include brettw or | 71 // not a WebContents, returns NULL. DEPRECATED: Be sure to include brettw or |
| 71 // jam as reviewers before you use this method. http://crbug.com/82582 | 72 // jam as reviewers before you use this method. http://crbug.com/82582 |
| 72 virtual WebContents* GetAsWebContents(); | 73 virtual WebContents* GetAsWebContents(); |
| 73 | 74 |
| 74 // The RenderView is being constructed (message sent to the renderer process | 75 // The RenderView is being constructed (message sent to the renderer process |
| 75 // to construct a RenderView). Now is a good time to send other setup events | 76 // to construct a RenderView). Now is a good time to send other setup events |
| 76 // to the RenderView. This precedes any other commands to the RenderView. | 77 // to the RenderView. This precedes any other commands to the RenderView. |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 // Whether download UI should be hidden. | 231 // Whether download UI should be hidden. |
| 231 virtual bool HideDownloadUI() const; | 232 virtual bool HideDownloadUI() const; |
| 232 | 233 |
| 233 protected: | 234 protected: |
| 234 virtual ~RenderViewHostDelegate() {} | 235 virtual ~RenderViewHostDelegate() {} |
| 235 }; | 236 }; |
| 236 | 237 |
| 237 } // namespace content | 238 } // namespace content |
| 238 | 239 |
| 239 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ | 240 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_VIEW_HOST_DELEGATE_H_ |
| OLD | NEW |