Chromium Code Reviews| 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_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/callback_forward.h" | 9 #include "base/callback_forward.h" |
| 10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 139 int /* y */)> GetRenderViewHostCallback; | 139 int /* y */)> GetRenderViewHostCallback; |
| 140 // Gets the RenderViewHost at coordinates (|x|, |y|) for this WebContents via | 140 // Gets the RenderViewHost at coordinates (|x|, |y|) for this WebContents via |
| 141 // |callback|. | 141 // |callback|. |
| 142 // This can be different than the current RenderViewHost if there is a | 142 // This can be different than the current RenderViewHost if there is a |
| 143 // BrowserPlugin at the specified position. | 143 // BrowserPlugin at the specified position. |
| 144 virtual void GetRenderViewHostAtPosition( | 144 virtual void GetRenderViewHostAtPosition( |
| 145 int x, | 145 int x, |
| 146 int y, | 146 int y, |
| 147 const GetRenderViewHostCallback& callback) = 0; | 147 const GetRenderViewHostCallback& callback) = 0; |
| 148 | 148 |
| 149 // Returns the WebContents embedding this WebContents, if any. | |
| 150 // If this is a top-level WebContents then it returns NULL. | |
| 151 virtual WebContents* GetEmbedderWebContents() const = 0; | |
| 152 | |
| 153 // Gets the instance ID of the current WebContents if it is embedded | |
| 154 // within a BrowserPlugin. It returns 0 if not. | |
| 155 virtual int GetInstanceID() const = 0; | |
|
jam
2013/02/06 17:02:09
why does this need to be exposed? i don't see it u
Fady Samuel
2013/02/06 17:06:00
It is, see in ExtensionRendererState
web_view_inf
| |
| 156 | |
| 149 // Gets the current RenderViewHost's routing id. Returns | 157 // Gets the current RenderViewHost's routing id. Returns |
| 150 // MSG_ROUTING_NONE when there is no RenderViewHost. | 158 // MSG_ROUTING_NONE when there is no RenderViewHost. |
| 151 virtual int GetRoutingID() const = 0; | 159 virtual int GetRoutingID() const = 0; |
| 152 | 160 |
| 153 // Returns the currently active RenderWidgetHostView. This may change over | 161 // Returns the currently active RenderWidgetHostView. This may change over |
| 154 // time and can be NULL (during setup and teardown). | 162 // time and can be NULL (during setup and teardown). |
| 155 virtual content::RenderWidgetHostView* GetRenderWidgetHostView() const = 0; | 163 virtual content::RenderWidgetHostView* GetRenderWidgetHostView() const = 0; |
| 156 | 164 |
| 157 // The WebContentsView will never change and is guaranteed non-NULL. | 165 // The WebContentsView will never change and is guaranteed non-NULL. |
| 158 virtual WebContentsView* GetView() const = 0; | 166 virtual WebContentsView* GetView() const = 0; |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 434 // is not resized to the given image_size. If 0 is passed, the first frame of | 442 // is not resized to the given image_size. If 0 is passed, the first frame of |
| 435 // the image is returned. | 443 // the image is returned. |
| 436 virtual int DownloadFavicon(const GURL& url, int image_size, | 444 virtual int DownloadFavicon(const GURL& url, int image_size, |
| 437 const FaviconDownloadCallback& callback) = 0; | 445 const FaviconDownloadCallback& callback) = 0; |
| 438 | 446 |
| 439 }; | 447 }; |
| 440 | 448 |
| 441 } // namespace content | 449 } // namespace content |
| 442 | 450 |
| 443 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 451 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
| OLD | NEW |