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

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

Issue 7285027: Require a default parent to use some Views implementations on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch to avoid --use-pure-views startup crashes. Created 9 years, 5 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/tab_contents/native_tab_contents_container_win.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 #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
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 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/tab_contents/native_tab_contents_container_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698