| 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.h" | 8 #include "chrome/browser/browser.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 22 matching lines...) Expand all Loading... |
| 33 // A ClientView subclass that provides the contents of a browser window, | 33 // A ClientView subclass that provides the contents of a browser window, |
| 34 // including the TabStrip, toolbars, download shelves, the content area etc. | 34 // including the TabStrip, toolbars, download shelves, the content area etc. |
| 35 // | 35 // |
| 36 class BrowserView : public BrowserWindow, | 36 class BrowserView : public BrowserWindow, |
| 37 public BrowserWindowTesting, | 37 public BrowserWindowTesting, |
| 38 public NotificationObserver, | 38 public NotificationObserver, |
| 39 public TabStripModelObserver, | 39 public TabStripModelObserver, |
| 40 public views::WindowDelegate, | 40 public views::WindowDelegate, |
| 41 public views::ClientView { | 41 public views::ClientView { |
| 42 public: | 42 public: |
| 43 // In restored mode, we draw a 1 px edge around the content area inside the |
| 44 // frame border. |
| 45 static const int kClientEdgeThickness; |
| 46 |
| 43 explicit BrowserView(Browser* browser); | 47 explicit BrowserView(Browser* browser); |
| 44 virtual ~BrowserView(); | 48 virtual ~BrowserView(); |
| 45 | 49 |
| 46 void set_frame(BrowserFrame* frame) { frame_ = frame; } | 50 void set_frame(BrowserFrame* frame) { frame_ = frame; } |
| 47 | 51 |
| 48 // Returns a pointer to the BrowserView* interface implementation (an | 52 // Returns a pointer to the BrowserView* interface implementation (an |
| 49 // instance of this object, typically) for a given HWND, or NULL if there is | 53 // instance of this object, typically) for a given HWND, or NULL if there is |
| 50 // no such association. | 54 // no such association. |
| 51 static BrowserView* GetBrowserViewForHWND(HWND window); | 55 static BrowserView* GetBrowserViewForHWND(HWND window); |
| 52 | 56 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 69 // avatar icon. | 73 // avatar icon. |
| 70 int GetTabStripHeight() const; | 74 int GetTabStripHeight() const; |
| 71 | 75 |
| 72 // Accessor for the TabStrip. | 76 // Accessor for the TabStrip. |
| 73 TabStrip* tabstrip() const { return tabstrip_; } | 77 TabStrip* tabstrip() const { return tabstrip_; } |
| 74 | 78 |
| 75 // Returns true if various window components are visible. | 79 // Returns true if various window components are visible. |
| 76 bool IsToolbarVisible() const; | 80 bool IsToolbarVisible() const; |
| 77 bool IsTabStripVisible() const; | 81 bool IsTabStripVisible() const; |
| 78 | 82 |
| 83 // Returns true if the toolbar is displaying its normal set of controls. |
| 84 bool IsToolbarDisplayModeNormal() const; |
| 85 |
| 79 // Returns true if the profile associated with this Browser window is | 86 // Returns true if the profile associated with this Browser window is |
| 80 // off the record. | 87 // off the record. |
| 81 bool IsOffTheRecord() const; | 88 bool IsOffTheRecord() const; |
| 82 | 89 |
| 83 // Returns true if the non-client view should render the Off-The-Record | 90 // Returns true if the non-client view should render the Off-The-Record |
| 84 // avatar icon if the window is off the record. | 91 // avatar icon if the window is off the record. |
| 85 bool ShouldShowOffTheRecordAvatar() const; | 92 bool ShouldShowOffTheRecordAvatar() const; |
| 86 | 93 |
| 87 // Handle the specified |accelerator| being pressed. | 94 // Handle the specified |accelerator| being pressed. |
| 88 bool AcceleratorPressed(const views::Accelerator& accelerator); | 95 bool AcceleratorPressed(const views::Accelerator& accelerator); |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 // P13N stuff | 418 // P13N stuff |
| 412 #ifdef CHROME_PERSONALIZATION | 419 #ifdef CHROME_PERSONALIZATION |
| 413 FramePersonalization personalization_; | 420 FramePersonalization personalization_; |
| 414 bool personalization_enabled_; | 421 bool personalization_enabled_; |
| 415 #endif | 422 #endif |
| 416 | 423 |
| 417 DISALLOW_EVIL_CONSTRUCTORS(BrowserView); | 424 DISALLOW_EVIL_CONSTRUCTORS(BrowserView); |
| 418 }; | 425 }; |
| 419 | 426 |
| 420 #endif // #ifndef CHROME_BROWSER_VIEWS_FRAME_BROWSER_VIEW_H_ | 427 #endif // #ifndef CHROME_BROWSER_VIEWS_FRAME_BROWSER_VIEW_H_ |
| OLD | NEW |