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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 218 | 218 |
| 219 // Stop any pending navigation. | 219 // Stop any pending navigation. |
| 220 virtual void Stop() = 0; | 220 virtual void Stop() = 0; |
| 221 | 221 |
| 222 // Creates a new WebContents with the same state as this one. The returned | 222 // Creates a new WebContents with the same state as this one. The returned |
| 223 // heap-allocated pointer is owned by the caller. | 223 // heap-allocated pointer is owned by the caller. |
| 224 virtual WebContents* Clone() = 0; | 224 virtual WebContents* Clone() = 0; |
| 225 | 225 |
| 226 // Window management --------------------------------------------------------- | 226 // Window management --------------------------------------------------------- |
| 227 | 227 |
| 228 // Adds a new tab or window with the given already-created contents. | 228 // Adds a new tab or window with the given already-created contents. Returns |
| 229 virtual void AddNewContents(WebContents* new_contents, | 229 // false if the window or tab was blocked. |
| 230 virtual bool AddNewContents(WebContents* new_contents, | |
|
jam
2012/08/29 00:07:23
can you get rid of this function altogether? most
| |
| 230 WindowOpenDisposition disposition, | 231 WindowOpenDisposition disposition, |
| 231 const gfx::Rect& initial_pos, | 232 const gfx::Rect& initial_pos, |
| 232 bool user_gesture) = 0; | 233 bool user_gesture) = 0; |
| 233 | 234 |
| 234 // Views and focus ----------------------------------------------------------- | 235 // Views and focus ----------------------------------------------------------- |
| 235 // TODO(brettw): Most of these should be removed and the caller should call | 236 // TODO(brettw): Most of these should be removed and the caller should call |
| 236 // the view directly. | 237 // the view directly. |
| 237 | 238 |
| 238 // Returns the actual window that is focused when this WebContents is shown. | 239 // Returns the actual window that is focused when this WebContents is shown. |
| 239 virtual gfx::NativeView GetContentNativeView() const = 0; | 240 virtual gfx::NativeView GetContentNativeView() const = 0; |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 389 // Focuses the location bar. | 390 // Focuses the location bar. |
| 390 virtual void SetFocusToLocationBar(bool select_all) = 0; | 391 virtual void SetFocusToLocationBar(bool select_all) = 0; |
| 391 | 392 |
| 392 // Does this have an opener associated with it? | 393 // Does this have an opener associated with it? |
| 393 virtual bool HasOpener() const = 0; | 394 virtual bool HasOpener() const = 0; |
| 394 }; | 395 }; |
| 395 | 396 |
| 396 } // namespace content | 397 } // namespace content |
| 397 | 398 |
| 398 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 399 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
| OLD | NEW |