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

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

Issue 6386009: Remove app/win/win_util.h,cc etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with NSApp changes in r73581 Created 9 years, 10 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/win_util.h"
13 #include "chrome/browser/accessibility/browser_accessibility_state.h" 12 #include "chrome/browser/accessibility/browser_accessibility_state.h"
14 #include "chrome/browser/profiles/profile.h" 13 #include "chrome/browser/profiles/profile.h"
15 #include "chrome/browser/browser_list.h" 14 #include "chrome/browser/browser_list.h"
16 #include "chrome/browser/themes/browser_theme_provider.h" 15 #include "chrome/browser/themes/browser_theme_provider.h"
17 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h" 16 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h"
18 #include "chrome/browser/ui/views/frame/browser_root_view.h" 17 #include "chrome/browser/ui/views/frame/browser_root_view.h"
19 #include "chrome/browser/ui/views/frame/browser_view.h" 18 #include "chrome/browser/ui/views/frame/browser_view.h"
20 #include "chrome/browser/ui/views/frame/glass_browser_frame_view.h" 19 #include "chrome/browser/ui/views/frame/glass_browser_frame_view.h"
21 #include "gfx/font.h" 20 #include "gfx/font.h"
22 #include "grit/theme_resources.h" 21 #include "grit/theme_resources.h"
23 #include "views/screen.h" 22 #include "views/screen.h"
24 #include "views/widget/widget_win.h" 23 #include "views/widget/widget_win.h"
25 #include "views/window/window_delegate.h" 24 #include "views/window/window_delegate.h"
25 #include "views/window/window_win.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
34 // static (Factory method.) 34 // static (Factory method.)
35 BrowserFrame* BrowserFrame::Create(BrowserView* browser_view, 35 BrowserFrame* BrowserFrame::Create(BrowserView* browser_view,
36 Profile* profile) { 36 Profile* profile) {
37 BrowserFrameWin* frame = new BrowserFrameWin(browser_view, profile); 37 BrowserFrameWin* frame = new BrowserFrameWin(browser_view, profile);
38 frame->Init(); 38 frame->Init();
39 return frame; 39 return frame;
40 } 40 }
41 41
42 // static 42 // static
43 const gfx::Font& BrowserFrame::GetTitleFont() { 43 const gfx::Font& BrowserFrame::GetTitleFont() {
44 static gfx::Font* title_font = new gfx::Font(app::win::GetWindowTitleFont()); 44 static gfx::Font* title_font =
45 new gfx::Font(views::WindowWin::GetWindowTitleFont());
45 return *title_font; 46 return *title_font;
46 } 47 }
47 48
48 /////////////////////////////////////////////////////////////////////////////// 49 ///////////////////////////////////////////////////////////////////////////////
49 // BrowserFrame, public: 50 // BrowserFrame, public:
50 51
51 BrowserFrameWin::BrowserFrameWin(BrowserView* browser_view, Profile* profile) 52 BrowserFrameWin::BrowserFrameWin(BrowserView* browser_view, Profile* profile)
52 : WindowWin(browser_view), 53 : WindowWin(browser_view),
53 browser_view_(browser_view), 54 browser_view_(browser_view),
54 root_view_(NULL), 55 root_view_(NULL),
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 gfx::Rect tabstrip_bounds( 307 gfx::Rect tabstrip_bounds(
307 GetBoundsForTabStrip(browser_view_->tabstrip())); 308 GetBoundsForTabStrip(browser_view_->tabstrip()));
308 margins.cyTopHeight = (browser_view_->UseVerticalTabs() ? 309 margins.cyTopHeight = (browser_view_->UseVerticalTabs() ?
309 tabstrip_bounds.y() : tabstrip_bounds.bottom()) + kDWMFrameTopOffset; 310 tabstrip_bounds.y() : tabstrip_bounds.bottom()) + kDWMFrameTopOffset;
310 } 311 }
311 } else { 312 } else {
312 // For popup and app windows we want to use the default margins. 313 // For popup and app windows we want to use the default margins.
313 } 314 }
314 DwmExtendFrameIntoClientArea(GetNativeView(), &margins); 315 DwmExtendFrameIntoClientArea(GetNativeView(), &margins);
315 } 316 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/constrained_window_win.cc ('k') | chrome/browser/ui/views/frame/browser_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698