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

Side by Side Diff: chrome/browser/ui/views/chrome_views_delegate.cc

Issue 10913237: Allow the Views Delegate to provide the native widget. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/chrome_views_delegate.h" 5 #include "chrome/browser/ui/views/chrome_views_delegate.h"
6 6
7 #include "base/command_line.h"
7 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
8 #include "base/string_util.h" 9 #include "base/string_util.h"
9 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/browser_process.h" 11 #include "chrome/browser/browser_process.h"
11 #include "chrome/browser/event_disposition.h" 12 #include "chrome/browser/event_disposition.h"
12 #include "chrome/browser/prefs/pref_service.h" 13 #include "chrome/browser/prefs/pref_service.h"
13 #include "chrome/browser/prefs/scoped_user_pref_update.h" 14 #include "chrome/browser/prefs/scoped_user_pref_update.h"
14 #include "chrome/browser/profiles/profile_manager.h" 15 #include "chrome/browser/profiles/profile_manager.h"
15 #include "chrome/browser/ui/views/accessibility/accessibility_event_router_views .h" 16 #include "chrome/browser/ui/views/accessibility/accessibility_event_router_views .h"
16 #include "chrome/common/pref_names.h" 17 #include "chrome/common/pref_names.h"
17 #include "ui/gfx/rect.h" 18 #include "ui/gfx/rect.h"
18 #include "ui/gfx/screen.h" 19 #include "ui/gfx/screen.h"
20 #include "ui/views/views_switches.h"
19 #include "ui/views/widget/native_widget.h" 21 #include "ui/views/widget/native_widget.h"
20 #include "ui/views/widget/widget.h" 22 #include "ui/views/widget/widget.h"
21 23
22 #if defined(OS_WIN) 24 #if defined(OS_WIN)
23 #include "chrome/browser/app_icon_win.h" 25 #include "chrome/browser/app_icon_win.h"
24 #endif 26 #endif
25 27
28 #if defined(USE_AURA) && !defined(OS_CHROMEOS)
29 #include "ui/views/widget/desktop_native_widget_aura.h"
30 #endif
31
26 #if defined(USE_AURA) 32 #if defined(USE_AURA)
27 #include "ui/views/widget/desktop_native_widget_helper_aura.h" 33 #include "ui/views/widget/desktop_native_widget_helper_aura.h"
28 #endif 34 #endif
29 35
30 #if defined(USE_ASH) 36 #if defined(USE_ASH)
31 #include "ash/shell.h" 37 #include "ash/shell.h"
32 #include "chrome/browser/ui/ash/ash_init.h" 38 #include "chrome/browser/ui/ash/ash_init.h"
33 #endif 39 #endif
34 40
35 namespace { 41 namespace {
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 return NULL; 176 return NULL;
171 #endif 177 #endif
172 } 178 }
173 #endif 179 #endif
174 180
175 content::WebContents* ChromeViewsDelegate::CreateWebContents( 181 content::WebContents* ChromeViewsDelegate::CreateWebContents(
176 content::BrowserContext* browser_context, 182 content::BrowserContext* browser_context,
177 content::SiteInstance* site_instance) { 183 content::SiteInstance* site_instance) {
178 return NULL; 184 return NULL;
179 } 185 }
186
187 views::NativeWidget* ChromeViewsDelegate::CreateNativeWidget(
188 views::internal::NativeWidgetDelegate* delegate,
189 gfx::NativeView parent) {
190 #if defined(USE_AURA) && !defined(OS_CHROMEOS)
191 if (CommandLine::ForCurrentProcess()->HasSwitch(views::switches::kWinAura))
192 return new views::DesktopNativeWidgetAura(delegate);
193 #endif
194 return NULL;
195 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/chrome_views_delegate.h ('k') | chrome/browser/ui/views/frame/browser_frame_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698