| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 CHROME_BROWSER_BROWSER_H_ | 5 #ifndef CHROME_BROWSER_BROWSER_H_ |
| 6 #define CHROME_BROWSER_BROWSER_H_ | 6 #define CHROME_BROWSER_BROWSER_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/controller.h" | 8 #include "chrome/browser/controller.h" |
| 9 #include "chrome/browser/shell_dialogs.h" | 9 #include "chrome/browser/shell_dialogs.h" |
| 10 #include "chrome/browser/browser_type.h" | 10 #include "chrome/browser/browser_type.h" |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 void SaveWindowPlacement(const gfx::Rect& bounds, bool maximized); | 101 void SaveWindowPlacement(const gfx::Rect& bounds, bool maximized); |
| 102 gfx::Rect GetSavedWindowBounds() const; | 102 gfx::Rect GetSavedWindowBounds() const; |
| 103 bool GetSavedMaximizedState() const; | 103 bool GetSavedMaximizedState() const; |
| 104 | 104 |
| 105 // Gets the FavIcon of the page in the selected tab. | 105 // Gets the FavIcon of the page in the selected tab. |
| 106 SkBitmap GetCurrentPageIcon() const; | 106 SkBitmap GetCurrentPageIcon() const; |
| 107 | 107 |
| 108 // Gets the title of the page in the selected tab. | 108 // Gets the title of the page in the selected tab. |
| 109 std::wstring GetCurrentPageTitle() const; | 109 std::wstring GetCurrentPageTitle() const; |
| 110 | 110 |
| 111 // Returns true if the current page is loading. |
| 112 bool IsCurrentPageLoading() const; |
| 113 |
| 111 // Prepares a title string for display (removes embedded newlines, etc). | 114 // Prepares a title string for display (removes embedded newlines, etc). |
| 112 static void FormatTitleForDisplay(std::wstring* title); | 115 static void FormatTitleForDisplay(std::wstring* title); |
| 113 | 116 |
| 114 // OnBeforeUnload handling ////////////////////////////////////////////////// | 117 // OnBeforeUnload handling ////////////////////////////////////////////////// |
| 115 | 118 |
| 116 // Gives beforeunload handlers the chance to cancel the close. | 119 // Gives beforeunload handlers the chance to cancel the close. |
| 117 bool ShouldCloseWindow(); | 120 bool ShouldCloseWindow(); |
| 118 | 121 |
| 119 // Invoked when the window containing us is closing. Performs the necessary | 122 // Invoked when the window containing us is closing. Performs the necessary |
| 120 // cleanup. | 123 // cleanup. |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 // If instance is not null, its process will be used to render the tab. | 300 // If instance is not null, its process will be used to render the tab. |
| 298 virtual TabContents* CreateTabContentsForURL( | 301 virtual TabContents* CreateTabContentsForURL( |
| 299 const GURL& url, | 302 const GURL& url, |
| 300 const GURL& referrer, | 303 const GURL& referrer, |
| 301 Profile* profile, | 304 Profile* profile, |
| 302 PageTransition::Type transition, | 305 PageTransition::Type transition, |
| 303 bool defer_load, | 306 bool defer_load, |
| 304 SiteInstance* instance) const; | 307 SiteInstance* instance) const; |
| 305 virtual bool CanDuplicateContentsAt(int index); | 308 virtual bool CanDuplicateContentsAt(int index); |
| 306 virtual void DuplicateContentsAt(int index); | 309 virtual void DuplicateContentsAt(int index); |
| 307 virtual void ValidateLoadingAnimations(); | |
| 308 virtual void CloseFrameAfterDragSession(); | 310 virtual void CloseFrameAfterDragSession(); |
| 309 | 311 |
| 310 // Overridden from TabStripModelObserver: | 312 // Overridden from TabStripModelObserver: |
| 311 virtual void TabInsertedAt(TabContents* contents, | 313 virtual void TabInsertedAt(TabContents* contents, |
| 312 int index, | 314 int index, |
| 313 bool foreground); | 315 bool foreground); |
| 314 virtual void TabClosingAt(TabContents* contents, int index); | 316 virtual void TabClosingAt(TabContents* contents, int index); |
| 315 virtual void TabDetachedAt(TabContents* contents, int index); | 317 virtual void TabDetachedAt(TabContents* contents, int index); |
| 316 virtual void TabSelectedAt(TabContents* old_contents, | 318 virtual void TabSelectedAt(TabContents* old_contents, |
| 317 TabContents* new_contents, | 319 TabContents* new_contents, |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 584 // The browser idle task helps cleanup unused memory resources when idle. | 586 // The browser idle task helps cleanup unused memory resources when idle. |
| 585 scoped_ptr<BrowserIdleTimer> idle_task_; | 587 scoped_ptr<BrowserIdleTimer> idle_task_; |
| 586 | 588 |
| 587 // Keep track of the encoding auto detect pref. | 589 // Keep track of the encoding auto detect pref. |
| 588 BooleanPrefMember encoding_auto_detect_; | 590 BooleanPrefMember encoding_auto_detect_; |
| 589 | 591 |
| 590 DISALLOW_COPY_AND_ASSIGN(Browser); | 592 DISALLOW_COPY_AND_ASSIGN(Browser); |
| 591 }; | 593 }; |
| 592 | 594 |
| 593 #endif // CHROME_BROWSER_BROWSER_H_ | 595 #endif // CHROME_BROWSER_BROWSER_H_ |
| OLD | NEW |