| 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. The instance ID of a WebContents uniquely |
| 155 // identifies it within its embedder WebContents. |
| 156 virtual int GetEmbeddedInstanceID() const = 0; |
| 157 |
| 149 // Gets the current RenderViewHost's routing id. Returns | 158 // Gets the current RenderViewHost's routing id. Returns |
| 150 // MSG_ROUTING_NONE when there is no RenderViewHost. | 159 // MSG_ROUTING_NONE when there is no RenderViewHost. |
| 151 virtual int GetRoutingID() const = 0; | 160 virtual int GetRoutingID() const = 0; |
| 152 | 161 |
| 153 // Returns the currently active RenderWidgetHostView. This may change over | 162 // Returns the currently active RenderWidgetHostView. This may change over |
| 154 // time and can be NULL (during setup and teardown). | 163 // time and can be NULL (during setup and teardown). |
| 155 virtual content::RenderWidgetHostView* GetRenderWidgetHostView() const = 0; | 164 virtual content::RenderWidgetHostView* GetRenderWidgetHostView() const = 0; |
| 156 | 165 |
| 157 // The WebContentsView will never change and is guaranteed non-NULL. | 166 // The WebContentsView will never change and is guaranteed non-NULL. |
| 158 virtual WebContentsView* GetView() const = 0; | 167 virtual WebContentsView* GetView() const = 0; |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 436 // is not resized to the given image_size. If 0 is passed, the first frame of | 445 // is not resized to the given image_size. If 0 is passed, the first frame of |
| 437 // the image is returned. | 446 // the image is returned. |
| 438 virtual int DownloadFavicon(const GURL& url, int image_size, | 447 virtual int DownloadFavicon(const GURL& url, int image_size, |
| 439 const FaviconDownloadCallback& callback) = 0; | 448 const FaviconDownloadCallback& callback) = 0; |
| 440 | 449 |
| 441 }; | 450 }; |
| 442 | 451 |
| 443 } // namespace content | 452 } // namespace content |
| 444 | 453 |
| 445 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 454 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
| OLD | NEW |