| 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_OPAQUE_NON_CLIENT_VIEW_H_ | 5 #ifndef CHROME_BROWSER_VIEWS_FRAME_OPAQUE_NON_CLIENT_VIEW_H_ |
| 6 #define CHROME_BROWSER_VIEWS_FRAME_OPAQUE_NON_CLIENT_VIEW_H_ | 6 #define CHROME_BROWSER_VIEWS_FRAME_OPAQUE_NON_CLIENT_VIEW_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/views/frame/opaque_frame.h" | 8 #include "chrome/browser/views/frame/opaque_frame.h" |
| 9 #include "chrome/browser/views/tab_icon_view.h" | 9 #include "chrome/browser/views/tab_icon_view.h" |
| 10 #include "chrome/views/non_client_view.h" | 10 #include "chrome/views/non_client_view.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 virtual views::View* GetViewForPoint(const gfx::Point& point, | 63 virtual views::View* GetViewForPoint(const gfx::Point& point, |
| 64 bool can_create_floating); | 64 bool can_create_floating); |
| 65 virtual void ViewHierarchyChanged(bool is_add, | 65 virtual void ViewHierarchyChanged(bool is_add, |
| 66 views::View* parent, | 66 views::View* parent, |
| 67 views::View* child); | 67 views::View* child); |
| 68 virtual bool GetAccessibleRole(VARIANT* role); | 68 virtual bool GetAccessibleRole(VARIANT* role); |
| 69 virtual bool GetAccessibleName(std::wstring* name); | 69 virtual bool GetAccessibleName(std::wstring* name); |
| 70 virtual void SetAccessibleName(const std::wstring& name); | 70 virtual void SetAccessibleName(const std::wstring& name); |
| 71 | 71 |
| 72 private: | 72 private: |
| 73 // Returns the height of the non-client area at the top of the window (the | 73 // Returns the width of the border that makes up the window frame left and |
| 74 // title bar, etc). | 74 // right edges. This does not include any client edge. |
| 75 int CalculateNonClientTopHeight() const; | 75 int FrameBorderWidth() const; |
| 76 | 76 |
| 77 // Returns the current thickness of the border that makes up the window left | 77 // Returns the height of the border that makes up the window frame top edge. |
| 78 // and right edges. | 78 // Because this border is graphically one component with the rest of the |
| 79 int HorizontalBorderSize() const; | 79 // nonclient top border, this is rarely useful directly. |
| 80 int FrameTopBorderHeight() const; |
| 80 | 81 |
| 81 // Returns the current thickness of the border that makes up the window bottom | 82 // Returns the height of the top resize area. This is smaller than the frame |
| 82 // edge. | 83 // border height in order to increase the window draggable area. |
| 83 int VerticalBorderBottomSize() const; | 84 int TopResizeHeight() const; |
| 84 | 85 |
| 85 // Paint various sub-components of this view. | 86 // Returns the width of the entire nonclient left and right borders, including |
| 86 void PaintFrameBorder(ChromeCanvas* canvas); | 87 // both the window frame and any client edge. |
| 88 int NonClientBorderWidth() const; |
| 89 |
| 90 // Returns the height of the entire nonclient top border, including the window |
| 91 // frame, any title area, and any connected client edge. |
| 92 int NonClientTopBorderHeight() const; |
| 93 |
| 94 // Returns the height of the entire nonclient bottom border, including both |
| 95 // the window frame and the client edge. |
| 96 int NonClientBottomBorderHeight() const; |
| 97 |
| 98 // For windows without a toolbar, restored mode also draws a client edge below |
| 99 // the titlebar which is considered part of the nonclient height. This |
| 100 // returns the height of any such edge. |
| 101 int ClientEdgeThicknessWithinNonClientHeight() const; |
| 102 |
| 103 // Calculates multiple values related to title layout. Returns the height of |
| 104 // the entire titlebar including any connected client edge. |
| 105 int TitleCoordinates(int* title_top_spacing, |
| 106 int* title_thickness) const; |
| 107 |
| 108 // Paint various sub-components of this view. The *FrameBorder() functions |
| 109 // also paint the background of the titlebar area, since the top frame border |
| 110 // and titlebar background are a contiguous component. |
| 111 void PaintRestoredFrameBorder(ChromeCanvas* canvas); |
| 87 void PaintMaximizedFrameBorder(ChromeCanvas* canvas); | 112 void PaintMaximizedFrameBorder(ChromeCanvas* canvas); |
| 88 void PaintDistributorLogo(ChromeCanvas* canvas); | 113 void PaintDistributorLogo(ChromeCanvas* canvas); |
| 89 void PaintTitleBar(ChromeCanvas* canvas); | 114 void PaintTitleBar(ChromeCanvas* canvas); |
| 90 void PaintToolbarBackground(ChromeCanvas* canvas); | 115 void PaintToolbarBackground(ChromeCanvas* canvas); |
| 91 void PaintOTRAvatar(ChromeCanvas* canvas); | 116 void PaintOTRAvatar(ChromeCanvas* canvas); |
| 92 void PaintClientEdge(ChromeCanvas* canvas); | 117 void PaintRestoredClientEdge(ChromeCanvas* canvas); |
| 93 void PaintMaximizedClientEdge(ChromeCanvas* canvas); | |
| 94 | 118 |
| 95 // Layout various sub-components of this view. | 119 // Layout various sub-components of this view. |
| 96 void LayoutWindowControls(); | 120 void LayoutWindowControls(); |
| 97 void LayoutDistributorLogo(); | 121 void LayoutDistributorLogo(); |
| 98 void LayoutTitleBar(); | 122 void LayoutTitleBar(); |
| 99 void LayoutOTRAvatar(); | 123 void LayoutOTRAvatar(); |
| 100 void LayoutClientView(); | 124 void LayoutClientView(); |
| 101 | 125 |
| 102 // Returns the set of resources to use to paint this view. | 126 // Returns the set of resources to use to paint this view. |
| 103 views::WindowResources* resources() const { | 127 views::WindowResources* resources() const { |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 static views::WindowResources* inactive_resources_; | 173 static views::WindowResources* inactive_resources_; |
| 150 static views::WindowResources* active_otr_resources_; | 174 static views::WindowResources* active_otr_resources_; |
| 151 static views::WindowResources* inactive_otr_resources_; | 175 static views::WindowResources* inactive_otr_resources_; |
| 152 static ChromeFont title_font_; | 176 static ChromeFont title_font_; |
| 153 | 177 |
| 154 DISALLOW_EVIL_CONSTRUCTORS(OpaqueNonClientView); | 178 DISALLOW_EVIL_CONSTRUCTORS(OpaqueNonClientView); |
| 155 }; | 179 }; |
| 156 | 180 |
| 157 #endif // #ifndef CHROME_BROWSER_VIEWS_FRAME_OPAQUE_NON_CLIENT_VIEW_H_ | 181 #endif // #ifndef CHROME_BROWSER_VIEWS_FRAME_OPAQUE_NON_CLIENT_VIEW_H_ |
| 158 | 182 |
| OLD | NEW |