| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 | 37 |
| 38 namespace content { | 38 namespace content { |
| 39 | 39 |
| 40 class BrowserContext; | 40 class BrowserContext; |
| 41 class InterstitialPage; | 41 class InterstitialPage; |
| 42 class NavigationController; | 42 class NavigationController; |
| 43 class RenderProcessHost; | 43 class RenderProcessHost; |
| 44 class WebContentsDelegate; | 44 class WebContentsDelegate; |
| 45 struct RendererPreferences; | 45 struct RendererPreferences; |
| 46 class SiteInstance; | 46 class SiteInstance; |
| 47 struct SSLStatus; | |
| 48 // TODO(jam): of course we will have to rename WebContentsView etc to use | 47 // TODO(jam): of course we will have to rename WebContentsView etc to use |
| 49 // WebContents. | 48 // WebContents. |
| 50 class WebContentsView; | 49 class WebContentsView; |
| 51 | 50 |
| 52 // Describes what goes in the main content area of a tab. | 51 // Describes what goes in the main content area of a tab. |
| 53 class WebContents : public PageNavigator { | 52 class WebContents : public PageNavigator { |
| 54 public: | 53 public: |
| 55 // |base_tab_contents| is used if we want to size the new tab contents view | 54 // |base_tab_contents| is used if we want to size the new tab contents view |
| 56 // based on an existing tab contents view. This can be NULL if not needed. | 55 // based on an existing tab contents view. This can be NULL if not needed. |
| 57 // | 56 // |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 | 209 |
| 211 // Commands ------------------------------------------------------------------ | 210 // Commands ------------------------------------------------------------------ |
| 212 | 211 |
| 213 // Stop any pending navigation. | 212 // Stop any pending navigation. |
| 214 virtual void Stop() = 0; | 213 virtual void Stop() = 0; |
| 215 | 214 |
| 216 // Creates a new WebContents with the same state as this one. The returned | 215 // Creates a new WebContents with the same state as this one. The returned |
| 217 // heap-allocated pointer is owned by the caller. | 216 // heap-allocated pointer is owned by the caller. |
| 218 virtual WebContents* Clone() = 0; | 217 virtual WebContents* Clone() = 0; |
| 219 | 218 |
| 220 // Shows the page info. | |
| 221 virtual void ShowPageInfo(const GURL& url, | |
| 222 const SSLStatus& ssl, | |
| 223 bool show_history) = 0; | |
| 224 | |
| 225 // Window management --------------------------------------------------------- | 219 // Window management --------------------------------------------------------- |
| 226 | 220 |
| 227 // Adds a new tab or window with the given already-created contents. | 221 // Adds a new tab or window with the given already-created contents. |
| 228 virtual void AddNewContents(WebContents* new_contents, | 222 virtual void AddNewContents(WebContents* new_contents, |
| 229 WindowOpenDisposition disposition, | 223 WindowOpenDisposition disposition, |
| 230 const gfx::Rect& initial_pos, | 224 const gfx::Rect& initial_pos, |
| 231 bool user_gesture) = 0; | 225 bool user_gesture) = 0; |
| 232 | 226 |
| 233 // Views and focus ----------------------------------------------------------- | 227 // Views and focus ----------------------------------------------------------- |
| 234 // TODO(brettw): Most of these should be removed and the caller should call | 228 // TODO(brettw): Most of these should be removed and the caller should call |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 // to see what it should do. | 357 // to see what it should do. |
| 364 virtual bool FocusLocationBarByDefault() = 0; | 358 virtual bool FocusLocationBarByDefault() = 0; |
| 365 | 359 |
| 366 // Focuses the location bar. | 360 // Focuses the location bar. |
| 367 virtual void SetFocusToLocationBar(bool select_all) = 0; | 361 virtual void SetFocusToLocationBar(bool select_all) = 0; |
| 368 }; | 362 }; |
| 369 | 363 |
| 370 } // namespace content | 364 } // namespace content |
| 371 | 365 |
| 372 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 366 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
| OLD | NEW |