 Chromium Code Reviews
 Chromium Code Reviews Issue 6692001:
  Add in DOMBrowserView and Frame related classes  (Closed) 
  Base URL: http://git.chromium.org/git/chromium.git@trunk
    
  
    Issue 6692001:
  Add in DOMBrowserView and Frame related classes  (Closed) 
  Base URL: http://git.chromium.org/git/chromium.git@trunk| OLD | NEW | 
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/ui/views/frame/browser_frame.h" | 9 #include "chrome/browser/ui/views/frame/browser_frame.h" | 
| 10 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h" | 10 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h" | 
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 68 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; | 68 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; | 
| 69 | 69 | 
| 70 // Overridden from views::ButtonListener: | 70 // Overridden from views::ButtonListener: | 
| 71 virtual void ButtonPressed(views::Button* sender, const views::Event& event) | 71 virtual void ButtonPressed(views::Button* sender, const views::Event& event) | 
| 72 OVERRIDE; | 72 OVERRIDE; | 
| 73 | 73 | 
| 74 // Overridden from TabIconView::TabIconViewModel: | 74 // Overridden from TabIconView::TabIconViewModel: | 
| 75 virtual bool ShouldTabIconViewAnimate() const OVERRIDE; | 75 virtual bool ShouldTabIconViewAnimate() const OVERRIDE; | 
| 76 virtual SkBitmap GetFavIconForTabIconView() OVERRIDE; | 76 virtual SkBitmap GetFavIconForTabIconView() OVERRIDE; | 
| 77 | 77 | 
| 78 protected: | |
| 79 virtual void LayoutOTRAvatar(); | |
| 
oshima
2011/03/16 21:10:25
OVERRIDE
 
rharrison
2011/03/17 17:00:50
Done.
 | |
| 80 | |
| 78 private: | 81 private: | 
| 79 // Returns the thickness of the border that makes up the window frame edges. | 82 // Returns the thickness of the border that makes up the window frame edges. | 
| 80 // This does not include any client edge. If |restored| is true, acts as if | 83 // This does not include any client edge. If |restored| is true, acts as if | 
| 81 // the window is restored regardless of the real mode. | 84 // the window is restored regardless of the real mode. | 
| 82 int FrameBorderThickness(bool restored) const; | 85 int FrameBorderThickness(bool restored) const; | 
| 83 | 86 | 
| 84 // Returns the height of the top resize area. This is smaller than the frame | 87 // Returns the height of the top resize area. This is smaller than the frame | 
| 85 // border height in order to increase the window draggable area. | 88 // border height in order to increase the window draggable area. | 
| 86 int TopResizeHeight() const; | 89 int TopResizeHeight() const; | 
| 87 | 90 | 
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 119 void PaintRestoredFrameBorder(gfx::Canvas* canvas); | 122 void PaintRestoredFrameBorder(gfx::Canvas* canvas); | 
| 120 void PaintMaximizedFrameBorder(gfx::Canvas* canvas); | 123 void PaintMaximizedFrameBorder(gfx::Canvas* canvas); | 
| 121 void PaintTitleBar(gfx::Canvas* canvas); | 124 void PaintTitleBar(gfx::Canvas* canvas); | 
| 122 void PaintToolbarBackground(gfx::Canvas* canvas); | 125 void PaintToolbarBackground(gfx::Canvas* canvas); | 
| 123 void PaintOTRAvatar(gfx::Canvas* canvas); | 126 void PaintOTRAvatar(gfx::Canvas* canvas); | 
| 124 void PaintRestoredClientEdge(gfx::Canvas* canvas); | 127 void PaintRestoredClientEdge(gfx::Canvas* canvas); | 
| 125 | 128 | 
| 126 // Layout various sub-components of this view. | 129 // Layout various sub-components of this view. | 
| 127 void LayoutWindowControls(); | 130 void LayoutWindowControls(); | 
| 128 void LayoutTitleBar(); | 131 void LayoutTitleBar(); | 
| 129 void LayoutOTRAvatar(); | |
| 130 | 132 | 
| 131 // Returns the bounds of the client area for the specified view size. | 133 // Returns the bounds of the client area for the specified view size. | 
| 132 gfx::Rect CalculateClientAreaBounds(int width, int height) const; | 134 gfx::Rect CalculateClientAreaBounds(int width, int height) const; | 
| 133 | 135 | 
| 134 // The layout rect of the title, if visible. | 136 // The layout rect of the title, if visible. | 
| 135 gfx::Rect title_bounds_; | 137 gfx::Rect title_bounds_; | 
| 136 | 138 | 
| 137 // The layout rect of the OTR avatar icon, if visible. | 139 // The layout rect of the OTR avatar icon, if visible. | 
| 138 gfx::Rect otr_avatar_bounds_; | 140 gfx::Rect otr_avatar_bounds_; | 
| 139 | 141 | 
| (...skipping 12 matching lines...) Expand all Loading... | |
| 152 // The BrowserView hosted within this View. | 154 // The BrowserView hosted within this View. | 
| 153 BrowserView* browser_view_; | 155 BrowserView* browser_view_; | 
| 154 | 156 | 
| 155 // The bounds of the ClientView. | 157 // The bounds of the ClientView. | 
| 156 gfx::Rect client_view_bounds_; | 158 gfx::Rect client_view_bounds_; | 
| 157 | 159 | 
| 158 DISALLOW_COPY_AND_ASSIGN(OpaqueBrowserFrameView); | 160 DISALLOW_COPY_AND_ASSIGN(OpaqueBrowserFrameView); | 
| 159 }; | 161 }; | 
| 160 | 162 | 
| 161 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_H_ | 163 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_H_ | 
| OLD | NEW |