| 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_VIEWS_FRAME_BROWSER_VIEW_H_ | 5 #ifndef CHROME_BROWSER_VIEWS_FRAME_BROWSER_VIEW_H_ |
| 6 #define CHROME_BROWSER_VIEWS_FRAME_BROWSER_VIEW_H_ | 6 #define CHROME_BROWSER_VIEWS_FRAME_BROWSER_VIEW_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/browser_type.h" | 8 #include "chrome/browser/browser_type.h" |
| 9 #include "chrome/browser/browser_window.h" | 9 #include "chrome/browser/browser_window.h" |
| 10 #include "chrome/browser/hang_monitor/hung_plugin_action.h" | 10 #include "chrome/browser/hang_monitor/hung_plugin_action.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 public NotificationObserver, | 36 public NotificationObserver, |
| 37 public TabStripModelObserver, | 37 public TabStripModelObserver, |
| 38 public views::WindowDelegate, | 38 public views::WindowDelegate, |
| 39 public views::ClientView { | 39 public views::ClientView { |
| 40 public: | 40 public: |
| 41 explicit BrowserView(Browser* browser); | 41 explicit BrowserView(Browser* browser); |
| 42 virtual ~BrowserView(); | 42 virtual ~BrowserView(); |
| 43 | 43 |
| 44 void set_frame(BrowserFrame* frame) { frame_ = frame; } | 44 void set_frame(BrowserFrame* frame) { frame_ = frame; } |
| 45 | 45 |
| 46 // Returns the show flag that should be used to show the frame containing |
| 47 // this view. |
| 48 int GetShowState() const; |
| 49 |
| 46 // Called by the frame to notify the BrowserView that it was moved, and that | 50 // Called by the frame to notify the BrowserView that it was moved, and that |
| 47 // any dependent popup windows should be repositioned. | 51 // any dependent popup windows should be repositioned. |
| 48 void WindowMoved(); | 52 void WindowMoved(); |
| 49 | 53 |
| 50 // Returns the bounds of the toolbar, in BrowserView coordinates. | 54 // Returns the bounds of the toolbar, in BrowserView coordinates. |
| 51 gfx::Rect GetToolbarBounds() const; | 55 gfx::Rect GetToolbarBounds() const; |
| 52 | 56 |
| 53 // Returns the bounds of the content area, in the coordinates of the | 57 // Returns the bounds of the content area, in the coordinates of the |
| 54 // BrowserView's parent. | 58 // BrowserView's parent. |
| 55 gfx::Rect GetClientAreaBounds() const; | 59 gfx::Rect GetClientAreaBounds() const; |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 bool SupportsWindowFeature(WindowFeature feature) const; | 134 bool SupportsWindowFeature(WindowFeature feature) const; |
| 131 | 135 |
| 132 // Returns the set of WindowFeatures supported by the specified BrowserType. | 136 // Returns the set of WindowFeatures supported by the specified BrowserType. |
| 133 static unsigned int FeaturesForBrowserType(BrowserType::Type type); | 137 static unsigned int FeaturesForBrowserType(BrowserType::Type type); |
| 134 | 138 |
| 135 // Register preferences specific to this view. | 139 // Register preferences specific to this view. |
| 136 static void RegisterBrowserViewPrefs(PrefService* prefs); | 140 static void RegisterBrowserViewPrefs(PrefService* prefs); |
| 137 | 141 |
| 138 // Overridden from BrowserWindow: | 142 // Overridden from BrowserWindow: |
| 139 virtual void Init(); | 143 virtual void Init(); |
| 140 virtual void Show(int command, bool adjust_to_fit); | 144 virtual void Show(); |
| 141 virtual void Close(); | 145 virtual void Close(); |
| 142 virtual void Activate(); | 146 virtual void Activate(); |
| 143 virtual void FlashFrame(); | 147 virtual void FlashFrame(); |
| 144 virtual void* GetNativeHandle(); | 148 virtual void* GetNativeHandle(); |
| 145 virtual TabStrip* GetTabStrip() const; | 149 virtual TabStrip* GetTabStrip() const; |
| 146 virtual StatusBubble* GetStatusBubble(); | 150 virtual StatusBubble* GetStatusBubble(); |
| 147 virtual void SelectedTabToolbarSizeChanged(bool is_animating); | 151 virtual void SelectedTabToolbarSizeChanged(bool is_animating); |
| 148 virtual void UpdateTitleBar(); | 152 virtual void UpdateTitleBar(); |
| 149 virtual void ValidateThrobber(); | 153 virtual void ValidateThrobber(); |
| 150 virtual gfx::Rect GetNormalBounds(); | 154 virtual gfx::Rect GetNormalBounds() const; |
| 151 virtual bool IsMaximized(); | 155 virtual bool IsMaximized(); |
| 152 virtual ToolbarStarToggle* GetStarButton() const; | 156 virtual ToolbarStarToggle* GetStarButton() const; |
| 153 virtual LocationBarView* GetLocationBarView() const; | 157 virtual LocationBarView* GetLocationBarView() const; |
| 154 virtual GoButton* GetGoButton() const; | 158 virtual GoButton* GetGoButton() const; |
| 155 virtual BookmarkBarView* GetBookmarkBarView(); | 159 virtual BookmarkBarView* GetBookmarkBarView(); |
| 156 virtual BrowserView* GetBrowserView() const; | 160 virtual BrowserView* GetBrowserView() const; |
| 157 virtual void UpdateToolbar(TabContents* contents, bool should_restore_state); | 161 virtual void UpdateToolbar(TabContents* contents, bool should_restore_state); |
| 158 virtual void FocusToolbar(); | 162 virtual void FocusToolbar(); |
| 159 virtual void DestroyBrowser(); | 163 virtual void DestroyBrowser(); |
| 160 virtual bool IsBookmarkBarVisible() const; | 164 virtual bool IsBookmarkBarVisible() const; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 175 // Overridden from views::WindowDelegate: | 179 // Overridden from views::WindowDelegate: |
| 176 virtual bool CanResize() const; | 180 virtual bool CanResize() const; |
| 177 virtual bool CanMaximize() const; | 181 virtual bool CanMaximize() const; |
| 178 virtual bool IsModal() const; | 182 virtual bool IsModal() const; |
| 179 virtual std::wstring GetWindowTitle() const; | 183 virtual std::wstring GetWindowTitle() const; |
| 180 virtual views::View* GetInitiallyFocusedView() const; | 184 virtual views::View* GetInitiallyFocusedView() const; |
| 181 virtual bool ShouldShowWindowTitle() const; | 185 virtual bool ShouldShowWindowTitle() const; |
| 182 virtual SkBitmap GetWindowIcon(); | 186 virtual SkBitmap GetWindowIcon(); |
| 183 virtual bool ShouldShowWindowIcon() const; | 187 virtual bool ShouldShowWindowIcon() const; |
| 184 virtual bool ExecuteWindowsCommand(int command_id); | 188 virtual bool ExecuteWindowsCommand(int command_id); |
| 185 virtual void SaveWindowPosition(const CRect& bounds, | 189 virtual void SaveWindowPlacement(const gfx::Rect& bounds, |
| 186 bool maximized, | 190 bool maximized, |
| 187 bool always_on_top); | 191 bool always_on_top); |
| 188 virtual bool RestoreWindowPosition(CRect* bounds, | 192 virtual bool GetSavedWindowBounds(gfx::Rect* bounds) const; |
| 189 bool* maximized, | 193 virtual bool GetSavedMaximizedState(bool* maximized) const; |
| 190 bool* always_on_top); | |
| 191 virtual void WindowClosing(); | 194 virtual void WindowClosing(); |
| 192 virtual views::View* GetContentsView(); | 195 virtual views::View* GetContentsView(); |
| 193 virtual views::ClientView* CreateClientView(views::Window* window); | 196 virtual views::ClientView* CreateClientView(views::Window* window); |
| 194 | 197 |
| 195 // Overridden from views::ClientView: | 198 // Overridden from views::ClientView: |
| 196 virtual bool CanClose() const; | 199 virtual bool CanClose() const; |
| 197 virtual int NonClientHitTest(const gfx::Point& point); | 200 virtual int NonClientHitTest(const gfx::Point& point); |
| 198 | 201 |
| 199 // Is P13N enabled for this browser window? | 202 // Is P13N enabled for this browser window? |
| 200 #ifdef CHROME_PERSONALIZATION | 203 #ifdef CHROME_PERSONALIZATION |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 // P13N stuff | 377 // P13N stuff |
| 375 #ifdef CHROME_PERSONALIZATION | 378 #ifdef CHROME_PERSONALIZATION |
| 376 FramePersonalization personalization_; | 379 FramePersonalization personalization_; |
| 377 bool personalization_enabled_; | 380 bool personalization_enabled_; |
| 378 #endif | 381 #endif |
| 379 | 382 |
| 380 DISALLOW_EVIL_CONSTRUCTORS(BrowserView); | 383 DISALLOW_EVIL_CONSTRUCTORS(BrowserView); |
| 381 }; | 384 }; |
| 382 | 385 |
| 383 #endif // #ifndef CHROME_BROWSER_VIEWS_FRAME_BROWSER_VIEW_H_ | 386 #endif // #ifndef CHROME_BROWSER_VIEWS_FRAME_BROWSER_VIEW_H_ |
| OLD | NEW |