| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "chrome/browser/ui/views/frame/browser_frame.h" | 10 #include "chrome/browser/ui/views/frame/browser_frame.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 virtual gfx::Rect GetBoundsForClientView() const OVERRIDE; | 68 virtual gfx::Rect GetBoundsForClientView() const OVERRIDE; |
| 69 virtual gfx::Rect GetWindowBoundsForClientBounds( | 69 virtual gfx::Rect GetWindowBoundsForClientBounds( |
| 70 const gfx::Rect& client_bounds) const OVERRIDE; | 70 const gfx::Rect& client_bounds) const OVERRIDE; |
| 71 virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE; | 71 virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE; |
| 72 virtual void GetWindowMask(const gfx::Size& size, gfx::Path* window_mask) | 72 virtual void GetWindowMask(const gfx::Size& size, gfx::Path* window_mask) |
| 73 OVERRIDE; | 73 OVERRIDE; |
| 74 virtual void ResetWindowControls() OVERRIDE; | 74 virtual void ResetWindowControls() OVERRIDE; |
| 75 virtual void UpdateWindowIcon() OVERRIDE; | 75 virtual void UpdateWindowIcon() OVERRIDE; |
| 76 | 76 |
| 77 // Overridden from views::View: | 77 // Overridden from views::View: |
| 78 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 78 virtual void OnPaint(gfx::CanvasSkia* canvas) OVERRIDE; |
| 79 virtual void Layout() OVERRIDE; | 79 virtual void Layout() OVERRIDE; |
| 80 virtual bool HitTest(const gfx::Point& l) const OVERRIDE; | 80 virtual bool HitTest(const gfx::Point& l) const OVERRIDE; |
| 81 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; | 81 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; |
| 82 | 82 |
| 83 // Overridden from views::ButtonListener: | 83 // Overridden from views::ButtonListener: |
| 84 virtual void ButtonPressed(views::Button* sender, const views::Event& event) | 84 virtual void ButtonPressed(views::Button* sender, const views::Event& event) |
| 85 OVERRIDE; | 85 OVERRIDE; |
| 86 | 86 |
| 87 // Overridden from TabIconView::TabIconViewModel: | 87 // Overridden from TabIconView::TabIconViewModel: |
| 88 virtual bool ShouldTabIconViewAnimate() const OVERRIDE; | 88 virtual bool ShouldTabIconViewAnimate() const OVERRIDE; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 // not shown, e.g. to set the titlebar height. | 128 // not shown, e.g. to set the titlebar height. |
| 129 int IconSize() const; | 129 int IconSize() const; |
| 130 | 130 |
| 131 // Returns the bounds of the titlebar icon (or where the icon would be if | 131 // Returns the bounds of the titlebar icon (or where the icon would be if |
| 132 // there was one). | 132 // there was one). |
| 133 gfx::Rect IconBounds() const; | 133 gfx::Rect IconBounds() const; |
| 134 | 134 |
| 135 // Paint various sub-components of this view. The *FrameBorder() functions | 135 // Paint various sub-components of this view. The *FrameBorder() functions |
| 136 // also paint the background of the titlebar area, since the top frame border | 136 // also paint the background of the titlebar area, since the top frame border |
| 137 // and titlebar background are a contiguous component. | 137 // and titlebar background are a contiguous component. |
| 138 void PaintRestoredFrameBorder(gfx::Canvas* canvas); | 138 void PaintRestoredFrameBorder(gfx::CanvasSkia* canvas); |
| 139 void PaintMaximizedFrameBorder(gfx::Canvas* canvas); | 139 void PaintMaximizedFrameBorder(gfx::CanvasSkia* canvas); |
| 140 void PaintTitleBar(gfx::Canvas* canvas); | 140 void PaintTitleBar(gfx::CanvasSkia* canvas); |
| 141 void PaintToolbarBackground(gfx::Canvas* canvas); | 141 void PaintToolbarBackground(gfx::CanvasSkia* canvas); |
| 142 void PaintRestoredClientEdge(gfx::Canvas* canvas); | 142 void PaintRestoredClientEdge(gfx::CanvasSkia* canvas); |
| 143 | 143 |
| 144 // Compute aspects of the frame needed to paint the frame background. | 144 // Compute aspects of the frame needed to paint the frame background. |
| 145 SkColor GetFrameColor() const; | 145 SkColor GetFrameColor() const; |
| 146 SkBitmap* GetFrameBitmap() const; | 146 SkBitmap* GetFrameBitmap() const; |
| 147 SkBitmap* GetFrameOverlayBitmap() const; | 147 SkBitmap* GetFrameOverlayBitmap() const; |
| 148 int GetTopAreaHeight() const; | 148 int GetTopAreaHeight() const; |
| 149 | 149 |
| 150 // Layout various sub-components of this view. | 150 // Layout various sub-components of this view. |
| 151 void LayoutWindowControls(); | 151 void LayoutWindowControls(); |
| 152 void LayoutTitleBar(); | 152 void LayoutTitleBar(); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 175 | 175 |
| 176 content::NotificationRegistrar registrar_; | 176 content::NotificationRegistrar registrar_; |
| 177 | 177 |
| 178 // Background painter for the window frame. | 178 // Background painter for the window frame. |
| 179 scoped_ptr<views::FrameBackground> frame_background_; | 179 scoped_ptr<views::FrameBackground> frame_background_; |
| 180 | 180 |
| 181 DISALLOW_COPY_AND_ASSIGN(OpaqueBrowserFrameView); | 181 DISALLOW_COPY_AND_ASSIGN(OpaqueBrowserFrameView); |
| 182 }; | 182 }; |
| 183 | 183 |
| 184 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_H_ | 184 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_H_ |
| OLD | NEW |