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 #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 "chrome/browser/ui/browser_list.h" | 12 #include "chrome/browser/ui/browser_list.h" |
13 #include "chrome/browser/ui/views/frame/browser_frame_views.h" | 13 #include "chrome/browser/ui/views/frame/browser_frame_views.h" |
14 #include "chrome/browser/ui/views/frame/browser_view.h" | 14 #include "chrome/browser/ui/views/frame/browser_view.h" |
15 #include "content/browser/accessibility/browser_accessibility_state.h" | 15 #include "content/browser/accessibility/browser_accessibility_state.h" |
16 #include "grit/theme_resources.h" | 16 #include "grit/theme_resources.h" |
17 #include "ui/base/theme_provider.h" | 17 #include "ui/base/theme_provider.h" |
18 #include "ui/gfx/font.h" | 18 #include "ui/gfx/font.h" |
19 #include "views/screen.h" | 19 #include "views/screen.h" |
| 20 #include "views/views_delegate.h" |
20 #include "views/widget/native_widget_win.h" | 21 #include "views/widget/native_widget_win.h" |
21 #include "views/widget/widget.h" | 22 #include "views/widget/widget.h" |
22 #include "views/window/non_client_view.h" | 23 #include "views/window/non_client_view.h" |
23 | 24 |
24 // static | 25 // static |
25 static const int kClientEdgeThickness = 3; | 26 static const int kClientEdgeThickness = 3; |
26 static const int kTabDragWindowAlpha = 200; | 27 static const int kTabDragWindowAlpha = 200; |
27 // We need to offset the DWMFrame into the toolbar so that the blackness | 28 // We need to offset the DWMFrame into the toolbar so that the blackness |
28 // doesn't show up on our rounded corners. | 29 // doesn't show up on our rounded corners. |
29 static const int kDWMFrameTopOffset = 3; | 30 static const int kDWMFrameTopOffset = 3; |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 return *title_font; | 211 return *title_font; |
211 } | 212 } |
212 | 213 |
213 //////////////////////////////////////////////////////////////////////////////// | 214 //////////////////////////////////////////////////////////////////////////////// |
214 // NativeBrowserFrame, public: | 215 // NativeBrowserFrame, public: |
215 | 216 |
216 // static | 217 // static |
217 NativeBrowserFrame* NativeBrowserFrame::CreateNativeBrowserFrame( | 218 NativeBrowserFrame* NativeBrowserFrame::CreateNativeBrowserFrame( |
218 BrowserFrame* browser_frame, | 219 BrowserFrame* browser_frame, |
219 BrowserView* browser_view) { | 220 BrowserView* browser_view) { |
220 if (views::Widget::IsPureViews()) | 221 if (views::Widget::IsPureViews() && |
| 222 views::ViewsDelegate::views_delegate->GetDefaultParentView()) |
221 return new BrowserFrameViews(browser_frame, browser_view); | 223 return new BrowserFrameViews(browser_frame, browser_view); |
222 return new BrowserFrameWin(browser_frame, browser_view); | 224 return new BrowserFrameWin(browser_frame, browser_view); |
223 } | 225 } |
OLD | NEW |