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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 // Commands ------------------------------------------------------------------ | 265 // Commands ------------------------------------------------------------------ |
266 | 266 |
267 // Stop any pending navigation. | 267 // Stop any pending navigation. |
268 virtual void Stop() = 0; | 268 virtual void Stop() = 0; |
269 | 269 |
270 // Creates a new WebContents with the same state as this one. The returned | 270 // Creates a new WebContents with the same state as this one. The returned |
271 // heap-allocated pointer is owned by the caller. | 271 // heap-allocated pointer is owned by the caller. |
272 virtual WebContents* Clone() = 0; | 272 virtual WebContents* Clone() = 0; |
273 | 273 |
274 // Views and focus ----------------------------------------------------------- | 274 // Views and focus ----------------------------------------------------------- |
275 // TODO(brettw): Most of these should be removed and the caller should call | |
276 // the view directly. | |
277 | |
278 // Returns the actual window that is focused when this WebContents is shown. | |
279 virtual gfx::NativeView GetContentNativeView() const = 0; | |
280 | |
281 // Returns the NativeView associated with this WebContents. Outside of | |
282 // automation in the context of the UI, this is required to be implemented. | |
283 virtual gfx::NativeView GetNativeView() const = 0; | |
284 | |
285 // Returns the bounds of this WebContents in the screen coordinate system. | |
286 virtual void GetContainerBounds(gfx::Rect* out) const = 0; | |
287 | |
288 // Makes the tab the focused window. | |
289 virtual void Focus() = 0; | |
290 | |
291 // Focuses the first (last if |reverse| is true) element in the page. | 275 // Focuses the first (last if |reverse| is true) element in the page. |
292 // Invoked when this tab is getting the focus through tab traversal (|reverse| | 276 // Invoked when this tab is getting the focus through tab traversal (|reverse| |
293 // is true when using Shift-Tab). | 277 // is true when using Shift-Tab). |
294 virtual void FocusThroughTabTraversal(bool reverse) = 0; | 278 virtual void FocusThroughTabTraversal(bool reverse) = 0; |
295 | 279 |
296 // Interstitials ------------------------------------------------------------- | 280 // Interstitials ------------------------------------------------------------- |
297 | 281 |
298 // Various other systems need to know about our interstitials. | 282 // Various other systems need to know about our interstitials. |
299 virtual bool ShowingInterstitialPage() const = 0; | 283 virtual bool ShowingInterstitialPage() const = 0; |
300 | 284 |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 // is not resized to the given image_size. If 0 is passed, the first frame of | 430 // is not resized to the given image_size. If 0 is passed, the first frame of |
447 // the image is returned. | 431 // the image is returned. |
448 virtual int DownloadFavicon(const GURL& url, int image_size, | 432 virtual int DownloadFavicon(const GURL& url, int image_size, |
449 const FaviconDownloadCallback& callback) = 0; | 433 const FaviconDownloadCallback& callback) = 0; |
450 | 434 |
451 }; | 435 }; |
452 | 436 |
453 } // namespace content | 437 } // namespace content |
454 | 438 |
455 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 439 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
OLD | NEW |