| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 15 matching lines...) Expand all Loading... |
| 26 // WebContents. | 26 // WebContents. |
| 27 class TabContentsView; | 27 class TabContentsView; |
| 28 | 28 |
| 29 namespace base { | 29 namespace base { |
| 30 class PropertyBag; | 30 class PropertyBag; |
| 31 class TimeTicks; | 31 class TimeTicks; |
| 32 } | 32 } |
| 33 | 33 |
| 34 namespace gfx { | 34 namespace gfx { |
| 35 class Rect; | 35 class Rect; |
| 36 class Size; |
| 36 } | 37 } |
| 37 | 38 |
| 38 namespace net { | 39 namespace net { |
| 39 struct LoadStateWithParam; | 40 struct LoadStateWithParam; |
| 40 } | 41 } |
| 41 | 42 |
| 42 namespace content { | 43 namespace content { |
| 43 | 44 |
| 44 class BrowserContext; | 45 class BrowserContext; |
| 45 class NavigationController; | 46 class NavigationController; |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 // Opens view-source tab for this contents. | 322 // Opens view-source tab for this contents. |
| 322 virtual void ViewSource() = 0; | 323 virtual void ViewSource() = 0; |
| 323 | 324 |
| 324 virtual void ViewFrameSource(const GURL& url, | 325 virtual void ViewFrameSource(const GURL& url, |
| 325 const std::string& content_state)= 0; | 326 const std::string& content_state)= 0; |
| 326 | 327 |
| 327 // Gets the minimum/maximum zoom percent. | 328 // Gets the minimum/maximum zoom percent. |
| 328 virtual int GetMinimumZoomPercent() const = 0; | 329 virtual int GetMinimumZoomPercent() const = 0; |
| 329 virtual int GetMaximumZoomPercent() const = 0; | 330 virtual int GetMaximumZoomPercent() const = 0; |
| 330 | 331 |
| 332 // Gets the preferred size of the contents. |
| 333 virtual gfx::Size GetPreferredSize() const = 0; |
| 334 |
| 331 // Get the content restrictions (see content::ContentRestriction). | 335 // Get the content restrictions (see content::ContentRestriction). |
| 332 virtual int GetContentRestrictions() const = 0; | 336 virtual int GetContentRestrictions() const = 0; |
| 333 | 337 |
| 334 // Query the WebUIFactory for the TypeID for the current URL. | 338 // Query the WebUIFactory for the TypeID for the current URL. |
| 335 virtual WebUI::TypeID GetWebUITypeForCurrentState() = 0; | 339 virtual WebUI::TypeID GetWebUITypeForCurrentState() = 0; |
| 336 | 340 |
| 337 // Returns the WebUI for the current state of the tab. This will either be | 341 // Returns the WebUI for the current state of the tab. This will either be |
| 338 // the pending WebUI, the committed WebUI, or NULL. | 342 // the pending WebUI, the committed WebUI, or NULL. |
| 339 virtual WebUI* GetWebUIForCurrentState()= 0; | 343 virtual WebUI* GetWebUIForCurrentState()= 0; |
| 340 | 344 |
| 341 // Called when the reponse to a pending mouse lock request has arrived. | 345 // Called when the reponse to a pending mouse lock request has arrived. |
| 342 // Returns true if |allowed| is true and the mouse has been successfully | 346 // Returns true if |allowed| is true and the mouse has been successfully |
| 343 // locked. | 347 // locked. |
| 344 virtual bool GotResponseToLockMouseRequest(bool allowed) = 0; | 348 virtual bool GotResponseToLockMouseRequest(bool allowed) = 0; |
| 345 | 349 |
| 346 // Returns true if the location bar should be focused by default rather than | 350 // Returns true if the location bar should be focused by default rather than |
| 347 // the page contents. The view calls this function when the tab is focused | 351 // the page contents. The view calls this function when the tab is focused |
| 348 // to see what it should do. | 352 // to see what it should do. |
| 349 virtual bool FocusLocationBarByDefault() = 0; | 353 virtual bool FocusLocationBarByDefault() = 0; |
| 350 | 354 |
| 351 // Focuses the location bar. | 355 // Focuses the location bar. |
| 352 virtual void SetFocusToLocationBar(bool select_all) = 0; | 356 virtual void SetFocusToLocationBar(bool select_all) = 0; |
| 353 }; | 357 }; |
| 354 | 358 |
| 355 } // namespace content | 359 } // namespace content |
| 356 | 360 |
| 357 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ | 361 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_H_ |
| OLD | NEW |