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

Side by Side Diff: ash/shell.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 new addition 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
« no previous file with comments | « ash/shell.h ('k') | ash/system/tray/system_tray.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) 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 "ash/shell.h" 5 #include "ash/shell.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "ash/accelerators/focus_manager_factory.h" 10 #include "ash/accelerators/focus_manager_factory.h"
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 delegate_(delegate), 186 delegate_(delegate),
187 #if defined(OS_CHROMEOS) 187 #if defined(OS_CHROMEOS)
188 output_configurator_(new chromeos::OutputConfigurator()), 188 output_configurator_(new chromeos::OutputConfigurator()),
189 output_configurator_animation_( 189 output_configurator_animation_(
190 new internal::OutputConfiguratorAnimation()), 190 new internal::OutputConfiguratorAnimation()),
191 #endif // defined(OS_CHROMEOS) 191 #endif // defined(OS_CHROMEOS)
192 shelf_(NULL), 192 shelf_(NULL),
193 panel_layout_manager_(NULL), 193 panel_layout_manager_(NULL),
194 status_area_widget_(NULL), 194 status_area_widget_(NULL),
195 browser_context_(NULL) { 195 browser_context_(NULL) {
196 gfx::Screen::SetInstance(screen_); 196 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_);
197 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_ALTERNATE, screen_);
197 ui_controls::InstallUIControlsAura(internal::CreateUIControls()); 198 ui_controls::InstallUIControlsAura(internal::CreateUIControls());
198 #if defined(OS_CHROMEOS) 199 #if defined(OS_CHROMEOS)
199 output_configurator_->AddObserver(output_configurator_animation_.get()); 200 output_configurator_->AddObserver(output_configurator_animation_.get());
200 base::MessagePumpAuraX11::Current()->AddDispatcherForRootWindow( 201 base::MessagePumpAuraX11::Current()->AddDispatcherForRootWindow(
201 output_configurator()); 202 output_configurator());
202 #endif // defined(OS_CHROMEOS) 203 #endif // defined(OS_CHROMEOS)
203 } 204 }
204 205
205 Shell::~Shell() { 206 Shell::~Shell() {
206 views::FocusManagerFactory::Install(NULL); 207 views::FocusManagerFactory::Install(NULL);
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 aura::RootWindow* Shell::GetPrimaryRootWindow() { 330 aura::RootWindow* Shell::GetPrimaryRootWindow() {
330 return GetInstance()->display_controller()->GetPrimaryRootWindow(); 331 return GetInstance()->display_controller()->GetPrimaryRootWindow();
331 } 332 }
332 333
333 // static 334 // static
334 aura::RootWindow* Shell::GetActiveRootWindow() { 335 aura::RootWindow* Shell::GetActiveRootWindow() {
335 return GetInstance()->active_root_window_; 336 return GetInstance()->active_root_window_;
336 } 337 }
337 338
338 // static 339 // static
340 gfx::Screen* Shell::GetScreen() {
341 return gfx::Screen::GetScreenFor(GetPrimaryRootWindow());
342 }
343
344 // static
339 Shell::RootWindowList Shell::GetAllRootWindows() { 345 Shell::RootWindowList Shell::GetAllRootWindows() {
340 return Shell::GetInstance()->display_controller()-> 346 return Shell::GetInstance()->display_controller()->
341 GetAllRootWindows(); 347 GetAllRootWindows();
342 } 348 }
343 349
344 // static 350 // static
345 aura::Window* Shell::GetContainer(aura::RootWindow* root_window, 351 aura::Window* Shell::GetContainer(aura::RootWindow* root_window,
346 int container_id) { 352 int container_id) {
347 return root_window->GetChildById(container_id); 353 return root_window->GetChildById(container_id);
348 } 354 }
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
822 iter != controllers.end(); ++iter) { 828 iter != controllers.end(); ++iter) {
823 if ((*iter)->GetSystemModalLayoutManager()-> 829 if ((*iter)->GetSystemModalLayoutManager()->
824 CanWindowReceiveEvents(window)) { 830 CanWindowReceiveEvents(window)) {
825 return true; 831 return true;
826 } 832 }
827 } 833 }
828 return false; 834 return false;
829 } 835 }
830 836
831 } // namespace ash 837 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell.h ('k') | ash/system/tray/system_tray.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698