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

Side by Side Diff: chrome/browser/ui/views/frame/browser_frame_win.cc

Issue 6254011: Move UI-relevant Windows files to ui/base. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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 #include "chrome/browser/ui/views/frame/browser_frame_win.h" 5 #include "chrome/browser/ui/views/frame/browser_frame_win.h"
6 6
7 #include <dwmapi.h> 7 #include <dwmapi.h>
8 #include <shellapi.h> 8 #include <shellapi.h>
9 9
10 #include <set> 10 #include <set>
11 11
12 #include "app/win/hwnd_util.h"
13 #include "app/win/win_util.h" 12 #include "app/win/win_util.h"
14 #include "chrome/browser/accessibility/browser_accessibility_state.h" 13 #include "chrome/browser/accessibility/browser_accessibility_state.h"
15 #include "chrome/browser/profiles/profile.h" 14 #include "chrome/browser/profiles/profile.h"
16 #include "chrome/browser/browser_list.h" 15 #include "chrome/browser/browser_list.h"
17 #include "chrome/browser/themes/browser_theme_provider.h" 16 #include "chrome/browser/themes/browser_theme_provider.h"
18 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h" 17 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h"
19 #include "chrome/browser/ui/views/frame/browser_root_view.h" 18 #include "chrome/browser/ui/views/frame/browser_root_view.h"
20 #include "chrome/browser/ui/views/frame/browser_view.h" 19 #include "chrome/browser/ui/views/frame/browser_view.h"
21 #include "chrome/browser/ui/views/frame/glass_browser_frame_view.h" 20 #include "chrome/browser/ui/views/frame/glass_browser_frame_view.h"
22 #include "gfx/font.h" 21 #include "gfx/font.h"
23 #include "grit/theme_resources.h" 22 #include "grit/theme_resources.h"
23 #include "ui/base/win/hwnd_util.h"
24 #include "views/screen.h" 24 #include "views/screen.h"
25 #include "views/window/window_delegate.h" 25 #include "views/window/window_delegate.h"
26 26
27 // static 27 // static
28 static const int kClientEdgeThickness = 3; 28 static const int kClientEdgeThickness = 3;
29 static const int kTabDragWindowAlpha = 200; 29 static const int kTabDragWindowAlpha = 200;
30 // We need to offset the DWMFrame into the toolbar so that the blackness 30 // We need to offset the DWMFrame into the toolbar so that the blackness
31 // doesn't show up on our rounded corners. 31 // doesn't show up on our rounded corners.
32 static const int kDWMFrameTopOffset = 3; 32 static const int kDWMFrameTopOffset = 3;
33 33
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 } 102 }
103 103
104 bool BrowserFrameWin::AlwaysUseNativeFrame() const { 104 bool BrowserFrameWin::AlwaysUseNativeFrame() const {
105 // App panel windows draw their own frame. 105 // App panel windows draw their own frame.
106 if (browser_view_->IsBrowserTypePanel()) 106 if (browser_view_->IsBrowserTypePanel())
107 return false; 107 return false;
108 108
109 // We don't theme popup or app windows, so regardless of whether or not a 109 // We don't theme popup or app windows, so regardless of whether or not a
110 // theme is active for normal browser windows, we don't want to use the custom 110 // theme is active for normal browser windows, we don't want to use the custom
111 // frame for popups/apps. 111 // frame for popups/apps.
112 if (!browser_view_->IsBrowserTypeNormal() && app::win::ShouldUseVistaFrame()) 112 if (!browser_view_->IsBrowserTypeNormal() && ui::ShouldUseVistaFrame())
113 return true; 113 return true;
114 114
115 // Otherwise, we use the native frame when we're told we should by the theme 115 // Otherwise, we use the native frame when we're told we should by the theme
116 // provider (e.g. no custom theme is active). 116 // provider (e.g. no custom theme is active).
117 return GetThemeProvider()->ShouldUseNativeFrame(); 117 return GetThemeProvider()->ShouldUseNativeFrame();
118 } 118 }
119 119
120 views::View* BrowserFrameWin::GetFrameView() const { 120 views::View* BrowserFrameWin::GetFrameView() const {
121 return browser_frame_view_; 121 return browser_frame_view_;
122 } 122 }
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 gfx::Rect tabstrip_bounds( 305 gfx::Rect tabstrip_bounds(
306 GetBoundsForTabStrip(browser_view_->tabstrip())); 306 GetBoundsForTabStrip(browser_view_->tabstrip()));
307 margins.cyTopHeight = (browser_view_->UseVerticalTabs() ? 307 margins.cyTopHeight = (browser_view_->UseVerticalTabs() ?
308 tabstrip_bounds.y() : tabstrip_bounds.bottom()) + kDWMFrameTopOffset; 308 tabstrip_bounds.y() : tabstrip_bounds.bottom()) + kDWMFrameTopOffset;
309 } 309 }
310 } else { 310 } else {
311 // For popup and app windows we want to use the default margins. 311 // For popup and app windows we want to use the default margins.
312 } 312 }
313 DwmExtendFrameIntoClientArea(GetNativeView(), &margins); 313 DwmExtendFrameIntoClientArea(GetNativeView(), &margins);
314 } 314 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/first_run_bubble.cc ('k') | chrome/browser/ui/views/infobars/infobars.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698