| 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_GLASS_BROWSER_FRAME_VIEW_H_ | 5 #ifndef CHROME_BROWSER_VIEWS_FRAME_GLASS_BROWSER_FRAME_VIEW_H_ |
| 6 #define CHROME_BROWSER_VIEWS_FRAME_GLASS_BROWSER_FRAME_VIEW_H_ | 6 #define CHROME_BROWSER_VIEWS_FRAME_GLASS_BROWSER_FRAME_VIEW_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/views/frame/browser_frame.h" | 8 #include "chrome/browser/views/frame/browser_frame.h" |
| 9 #include "views/controls/button/button.h" | 9 #include "views/controls/button/button.h" |
| 10 #include "views/window/non_client_view.h" | 10 #include "views/window/non_client_view.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 virtual gfx::Rect GetWindowBoundsForClientBounds( | 27 virtual gfx::Rect GetWindowBoundsForClientBounds( |
| 28 const gfx::Rect& client_bounds) const; | 28 const gfx::Rect& client_bounds) const; |
| 29 virtual gfx::Point GetSystemMenuPoint() const; | 29 virtual gfx::Point GetSystemMenuPoint() const; |
| 30 virtual int NonClientHitTest(const gfx::Point& point); | 30 virtual int NonClientHitTest(const gfx::Point& point); |
| 31 virtual void GetWindowMask(const gfx::Size& size, gfx::Path* window_mask) { } | 31 virtual void GetWindowMask(const gfx::Size& size, gfx::Path* window_mask) { } |
| 32 virtual void EnableClose(bool enable) { } | 32 virtual void EnableClose(bool enable) { } |
| 33 virtual void ResetWindowControls() { } | 33 virtual void ResetWindowControls() { } |
| 34 | 34 |
| 35 protected: | 35 protected: |
| 36 // Overridden from views::View: | 36 // Overridden from views::View: |
| 37 virtual void Paint(ChromeCanvas* canvas); | 37 virtual void Paint(gfx::Canvas* canvas); |
| 38 virtual void Layout(); | 38 virtual void Layout(); |
| 39 | 39 |
| 40 private: | 40 private: |
| 41 // Returns the thickness of the border that makes up the window frame edges. | 41 // Returns the thickness of the border that makes up the window frame edges. |
| 42 // This does not include any client edge. | 42 // This does not include any client edge. |
| 43 int FrameBorderThickness() const; | 43 int FrameBorderThickness() const; |
| 44 | 44 |
| 45 // Returns the thickness of the entire nonclient left, right, and bottom | 45 // Returns the thickness of the entire nonclient left, right, and bottom |
| 46 // borders, including both the window frame and any client edge. | 46 // borders, including both the window frame and any client edge. |
| 47 int NonClientBorderThickness() const; | 47 int NonClientBorderThickness() const; |
| 48 | 48 |
| 49 // Returns the height of the entire nonclient top border, including the window | 49 // Returns the height of the entire nonclient top border, including the window |
| 50 // frame, any title area, and any connected client edge. | 50 // frame, any title area, and any connected client edge. |
| 51 int NonClientTopBorderHeight() const; | 51 int NonClientTopBorderHeight() const; |
| 52 | 52 |
| 53 // Paint various sub-components of this view. | 53 // Paint various sub-components of this view. |
| 54 void PaintDistributorLogo(ChromeCanvas* canvas); | 54 void PaintDistributorLogo(gfx::Canvas* canvas); |
| 55 void PaintToolbarBackground(ChromeCanvas* canvas); | 55 void PaintToolbarBackground(gfx::Canvas* canvas); |
| 56 void PaintOTRAvatar(ChromeCanvas* canvas); | 56 void PaintOTRAvatar(gfx::Canvas* canvas); |
| 57 void PaintRestoredClientEdge(ChromeCanvas* canvas); | 57 void PaintRestoredClientEdge(gfx::Canvas* canvas); |
| 58 | 58 |
| 59 // Layout various sub-components of this view. | 59 // Layout various sub-components of this view. |
| 60 void LayoutDistributorLogo(); | 60 void LayoutDistributorLogo(); |
| 61 void LayoutOTRAvatar(); | 61 void LayoutOTRAvatar(); |
| 62 void LayoutClientView(); | 62 void LayoutClientView(); |
| 63 | 63 |
| 64 // Returns the bounds of the client area for the specified view size. | 64 // Returns the bounds of the client area for the specified view size. |
| 65 gfx::Rect CalculateClientAreaBounds(int width, int height) const; | 65 gfx::Rect CalculateClientAreaBounds(int width, int height) const; |
| 66 | 66 |
| 67 // Starts/Stops the window throbber running. | 67 // Starts/Stops the window throbber running. |
| (...skipping 28 matching lines...) Expand all Loading... |
| 96 static SkBitmap* distributor_logo_; | 96 static SkBitmap* distributor_logo_; |
| 97 | 97 |
| 98 static const int kThrobberIconCount = 24; | 98 static const int kThrobberIconCount = 24; |
| 99 static HICON throbber_icons_[kThrobberIconCount]; | 99 static HICON throbber_icons_[kThrobberIconCount]; |
| 100 static void InitThrobberIcons(); | 100 static void InitThrobberIcons(); |
| 101 | 101 |
| 102 DISALLOW_EVIL_CONSTRUCTORS(GlassBrowserFrameView); | 102 DISALLOW_EVIL_CONSTRUCTORS(GlassBrowserFrameView); |
| 103 }; | 103 }; |
| 104 | 104 |
| 105 #endif // #ifndef CHROME_BROWSER_VIEWS_FRAME_GLASS_BROWSER_FRAME_VIEW_H_ | 105 #endif // #ifndef CHROME_BROWSER_VIEWS_FRAME_GLASS_BROWSER_FRAME_VIEW_H_ |
| OLD | NEW |