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

Side by Side Diff: content/shell/shell_aura.cc

Issue 11030017: Add context to gfx::Screen calls in support of simultaneous desktop+ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix some new gfx::Screen additions Created 8 years, 2 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 "content/shell/shell.h" 5 #include "content/shell/shell.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "ui/aura/desktop/desktop_screen.h" 9 #include "ui/aura/desktop/desktop_screen.h"
10 #include "ui/aura/desktop/desktop_stacking_client.h" 10 #include "ui/aura/desktop/desktop_stacking_client.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 void SetUseTransparentWindows(bool transparent) { 49 void SetUseTransparentWindows(bool transparent) {
50 use_transparent_windows_ = transparent; 50 use_transparent_windows_ = transparent;
51 } 51 }
52 52
53 // Overridden from views::TestViewsDelegate: 53 // Overridden from views::TestViewsDelegate:
54 virtual bool UseTransparentWindows() const OVERRIDE { 54 virtual bool UseTransparentWindows() const OVERRIDE {
55 return use_transparent_windows_; 55 return use_transparent_windows_;
56 } 56 }
57 virtual views::NativeWidgetHelperAura* CreateNativeWidgetHelper( 57 virtual views::NativeWidgetHelperAura* CreateNativeWidgetHelper(
58 views::NativeWidgetAura* native_widget) OVERRIDE { 58 views::NativeWidgetAura* native_widget, gfx::NativeView parent) OVERRIDE {
59 return new views::DesktopNativeWidgetHelperAura(native_widget); 59 return new views::DesktopNativeWidgetHelperAura(native_widget);
60 } 60 }
61 61
62 private: 62 private:
63 bool use_transparent_windows_; 63 bool use_transparent_windows_;
64 64
65 DISALLOW_COPY_AND_ASSIGN(ShellViewsDelegateAura); 65 DISALLOW_COPY_AND_ASSIGN(ShellViewsDelegateAura);
66 }; 66 };
67 67
68 // TODO(beng): This stuff should NOT be in the views namespace! 68 // TODO(beng): This stuff should NOT be in the views namespace!
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 aura::client::StackingClient* Shell::stacking_client_ = NULL; 282 aura::client::StackingClient* Shell::stacking_client_ = NULL;
283 views::ViewsDelegate* Shell::views_delegate_ = NULL; 283 views::ViewsDelegate* Shell::views_delegate_ = NULL;
284 284
285 // static 285 // static
286 void Shell::PlatformInitialize() { 286 void Shell::PlatformInitialize() {
287 #if defined(OS_CHROMEOS) 287 #if defined(OS_CHROMEOS)
288 chromeos::DBusThreadManager::Initialize(); 288 chromeos::DBusThreadManager::Initialize();
289 #endif 289 #endif
290 aura::Env::GetInstance()->SetDisplayManager(new aura::SingleDisplayManager); 290 aura::Env::GetInstance()->SetDisplayManager(new aura::SingleDisplayManager);
291 stacking_client_ = new aura::DesktopStackingClient(); 291 stacking_client_ = new aura::DesktopStackingClient();
292 gfx::Screen::SetInstance(aura::CreateDesktopScreen()); 292 gfx::Screen::SetScreenInstance(
293 gfx::SCREEN_TYPE_NATIVE, aura::CreateDesktopScreen());
293 views_delegate_ = new ShellViewsDelegateAura(); 294 views_delegate_ = new ShellViewsDelegateAura();
294 295
295 CommandLine::ForCurrentProcess()->AppendSwitch(views::switches::kDesktopAura); 296 CommandLine::ForCurrentProcess()->AppendSwitch(views::switches::kDesktopAura);
296 } 297 }
297 298
298 void Shell::PlatformExit() { 299 void Shell::PlatformExit() {
299 #if defined(OS_CHROMEOS) 300 #if defined(OS_CHROMEOS)
300 chromeos::DBusThreadManager::Shutdown(); 301 chromeos::DBusThreadManager::Shutdown();
301 #endif 302 #endif
302 if (stacking_client_) 303 if (stacking_client_)
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 } 356 }
356 357
357 void Shell::PlatformSetTitle(const string16& title) { 358 void Shell::PlatformSetTitle(const string16& title) {
358 ShellWindowDelegateView* delegate_view = 359 ShellWindowDelegateView* delegate_view =
359 static_cast<ShellWindowDelegateView*>(window_widget_->widget_delegate()); 360 static_cast<ShellWindowDelegateView*>(window_widget_->widget_delegate());
360 delegate_view->SetWindowTitle(title); 361 delegate_view->SetWindowTitle(title);
361 window_widget_->UpdateWindowTitle(); 362 window_widget_->UpdateWindowTitle();
362 } 363 }
363 364
364 } // namespace content 365 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698