Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(145)

Side by Side Diff: chrome/browser/ui/views/frame/opaque_browser_frame_view.h

Issue 6904160: Implement new gray mock. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed power test Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 // Returns the height of the entire nonclient top border, including the window
sky 2011/05/02 14:26:27 Most these before other overrides in the section.
79 // frame, any title area, and any connected client edge. If |restored| is
80 // true, acts as if the window is restored regardless of the real mode. If
81 // |ignore_vertical_tabs| is true, acts as if vertical tabs are off regardless
82 // of the real state.
83 int NonClientTopBorderHeight(bool restored, bool ignore_vertical_tabs) const;
84
85 // Allows a subclass to tweak the frame. Chromeos uses this to support
86 // drawing themes correctly even with extra padding above the tabs as
87 // well as drawing custom corners on the frame.
88 virtual void ModifyMaximizedFramePainting(
89 int* theme_offset, SkBitmap** left_corner, SkBitmap** right_corner);
sky 2011/05/02 14:26:27 each param on its own line. Also, document what th
90
91 // Expose these to subclasses.
92 BrowserFrame* frame() { return frame_; }
93 BrowserView* browser_view() { return browser_view_; }
94
78 private: 95 private:
79 // Returns the thickness of the border that makes up the window frame edges. 96 // 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 97 // This does not include any client edge. If |restored| is true, acts as if
81 // the window is restored regardless of the real mode. 98 // the window is restored regardless of the real mode.
82 int FrameBorderThickness(bool restored) const; 99 int FrameBorderThickness(bool restored) const;
83 100
84 // Returns the height of the top resize area. This is smaller than the frame 101 // 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. 102 // border height in order to increase the window draggable area.
86 int TopResizeHeight() const; 103 int TopResizeHeight() const;
87 104
88 // Returns the thickness of the entire nonclient left, right, and bottom 105 // Returns the thickness of the entire nonclient left, right, and bottom
89 // borders, including both the window frame and any client edge. 106 // borders, including both the window frame and any client edge.
90 int NonClientBorderThickness() const; 107 int NonClientBorderThickness() const;
91 108
92 // Returns the height of the entire nonclient top border, including the window
93 // frame, any title area, and any connected client edge. If |restored| is
94 // true, acts as if the window is restored regardless of the real mode. If
95 // |ignore_vertical_tabs| is true, acts as if vertical tabs are off regardless
96 // of the real state.
97 int NonClientTopBorderHeight(bool restored, bool ignore_vertical_tabs) const;
sky 2011/05/02 14:26:27 move implementation to match new position in heade
98
99 // Returns the y-coordinate of the caption buttons. If |restored| is true, 109 // Returns the y-coordinate of the caption buttons. If |restored| is true,
100 // acts as if the window is restored regardless of the real mode. 110 // acts as if the window is restored regardless of the real mode.
101 int CaptionButtonY(bool restored) const; 111 int CaptionButtonY(bool restored) const;
102 112
103 // Returns the thickness of the 3D edge along the bottom of the titlebar. If 113 // Returns the thickness of the 3D edge along the bottom of the titlebar. If
104 // |restored| is true, acts as if the window is restored regardless of the 114 // |restored| is true, acts as if the window is restored regardless of the
105 // real mode. 115 // real mode.
106 int TitlebarBottomThickness(bool restored) const; 116 int TitlebarBottomThickness(bool restored) const;
107 117
108 // Returns the size of the titlebar icon. This is used even when the icon is 118 // Returns the size of the titlebar icon. This is used even when the icon is
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 // The BrowserView hosted within this View. 162 // The BrowserView hosted within this View.
153 BrowserView* browser_view_; 163 BrowserView* browser_view_;
154 164
155 // The bounds of the ClientView. 165 // The bounds of the ClientView.
156 gfx::Rect client_view_bounds_; 166 gfx::Rect client_view_bounds_;
157 167
158 DISALLOW_COPY_AND_ASSIGN(OpaqueBrowserFrameView); 168 DISALLOW_COPY_AND_ASSIGN(OpaqueBrowserFrameView);
159 }; 169 };
160 170
161 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_H_ 171 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_OPAQUE_BROWSER_FRAME_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698