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

Side by Side Diff: chrome/browser/ui/panels/panel_browser_frame_view.h

Issue 8664021: Update Panel UI looks on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Created 9 years 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
« no previous file with comments | « chrome/browser/ui/panels/panel.h ('k') | chrome/browser/ui/panels/panel_browser_frame_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_PANELS_PANEL_BROWSER_FRAME_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_FRAME_VIEW_H_
6 #define CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_FRAME_VIEW_H_ 6 #define CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_FRAME_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/gtest_prod_util.h" 9 #include "base/gtest_prod_util.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/message_loop.h" 11 #include "base/message_loop.h"
12 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h" 12 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h"
13 #include "chrome/browser/ui/views/tab_icon_view.h" 13 #include "chrome/browser/ui/views/tab_icon_view.h"
14 #include "ui/base/animation/animation_delegate.h" 14 #include "ui/base/animation/animation_delegate.h"
15 #include "ui/views/controls/button/button.h" 15 #include "ui/views/controls/button/button.h"
16 #include "ui/views/controls/menu/view_menu_delegate.h" 16 #include "ui/views/controls/menu/view_menu_delegate.h"
17 17
18 class Extension; 18 class Extension;
19 class PanelBrowserView; 19 class PanelBrowserView;
20 class PanelSettingsMenuModel; 20 class PanelSettingsMenuModel;
21 class SkPaint;
21 namespace gfx { 22 namespace gfx {
22 class Font; 23 class Font;
23 } 24 }
24 namespace ui { 25 namespace ui {
25 class SlideAnimation; 26 class SlideAnimation;
26 } 27 }
27 namespace views { 28 namespace views {
28 class ImageButton; 29 class ImageButton;
29 class Label; 30 class Label;
30 class MenuButton; 31 class MenuButton;
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 135
135 // Returns the thickness of the entire nonclient left, right, and bottom 136 // Returns the thickness of the entire nonclient left, right, and bottom
136 // borders, including both the window frame and any client edge. 137 // borders, including both the window frame and any client edge.
137 int NonClientBorderThickness() const; 138 int NonClientBorderThickness() const;
138 139
139 // Update control styles to indicate if the titlebar is active or not. 140 // Update control styles to indicate if the titlebar is active or not.
140 void UpdateControlStyles(PaintState paint_state); 141 void UpdateControlStyles(PaintState paint_state);
141 142
142 // Custom draw the frame. 143 // Custom draw the frame.
143 void PaintFrameBorder(gfx::Canvas* canvas); 144 void PaintFrameBorder(gfx::Canvas* canvas);
144 void PaintClientEdge(gfx::Canvas* canvas);
145 145
146 // Called by MouseWatcher to notify if the mouse enters or leaves the window. 146 // Called by MouseWatcher to notify if the mouse enters or leaves the window.
147 void OnMouseEnterOrLeaveWindow(bool mouse_entered); 147 void OnMouseEnterOrLeaveWindow(bool mouse_entered);
148 148
149 // Retrieves the drawing metrics based on the current painting state. 149 // Retrieves the drawing metrics based on the current painting state.
150 SkColor GetDefaultTitleColor(PaintState paint_state) const;
150 SkColor GetTitleColor(PaintState paint_state) const; 151 SkColor GetTitleColor(PaintState paint_state) const;
151 gfx::Font* GetTitleFont() const; 152 const SkPaint& GetDefaultFrameTheme(PaintState paint_state) const;
152 SkBitmap* GetFrameTheme(PaintState paint_state) const; 153 SkBitmap* GetFrameTheme(PaintState paint_state) const;
153 154
154 // Make settings button visible if either of the conditions is met: 155 // Make settings button visible if either of the conditions is met:
155 // 1) The panel is active, i.e. having focus. 156 // 1) The panel is active, i.e. having focus.
156 // 2) The mouse is over the panel. 157 // 2) The mouse is over the panel.
157 void UpdateSettingsButtonVisibility(bool active, bool cursor_in_view); 158 void UpdateSettingsButtonVisibility(bool active, bool cursor_in_view);
158 159
160 bool UsingDefaultTheme() const;
161
159 const Extension* GetExtension() const; 162 const Extension* GetExtension() const;
160 163
161 bool EnsureSettingsMenuCreated(); 164 bool EnsureSettingsMenuCreated();
162 165
163 string16 GetTitleText() const; 166 string16 GetTitleText() const;
164 167
165 #ifdef UNIT_TEST 168 #ifdef UNIT_TEST
166 PanelSettingsMenuModel* settings_menu_model() const { 169 PanelSettingsMenuModel* settings_menu_model() const {
167 return settings_menu_model_.get(); 170 return settings_menu_model_.get();
168 } 171 }
(...skipping 23 matching lines...) Expand all
192 // Used to animate the visibility change of settings button. 195 // Used to animate the visibility change of settings button.
193 scoped_ptr<ui::SlideAnimation> settings_button_animator_; 196 scoped_ptr<ui::SlideAnimation> settings_button_animator_;
194 gfx::Rect settings_button_full_bounds_; 197 gfx::Rect settings_button_full_bounds_;
195 gfx::Rect settings_button_zero_bounds_; 198 gfx::Rect settings_button_zero_bounds_;
196 bool is_settings_button_visible_; 199 bool is_settings_button_visible_;
197 200
198 DISALLOW_COPY_AND_ASSIGN(PanelBrowserFrameView); 201 DISALLOW_COPY_AND_ASSIGN(PanelBrowserFrameView);
199 }; 202 };
200 203
201 #endif // CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_FRAME_VIEW_H_ 204 #endif // CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_FRAME_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/panel.h ('k') | chrome/browser/ui/panels/panel_browser_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698