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

Side by Side Diff: ash/shell.cc

Issue 11146023: Work on separate browser contexts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove unrelated change 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 "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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 : screen_(new ScreenAsh), 179 : screen_(new ScreenAsh),
180 active_root_window_(NULL), 180 active_root_window_(NULL),
181 delegate_(delegate), 181 delegate_(delegate),
182 #if defined(OS_CHROMEOS) 182 #if defined(OS_CHROMEOS)
183 output_configurator_(new chromeos::OutputConfigurator()), 183 output_configurator_(new chromeos::OutputConfigurator()),
184 output_configurator_animation_( 184 output_configurator_animation_(
185 new internal::OutputConfiguratorAnimation()), 185 new internal::OutputConfiguratorAnimation()),
186 #endif // defined(OS_CHROMEOS) 186 #endif // defined(OS_CHROMEOS)
187 browser_context_(NULL), 187 browser_context_(NULL),
188 simulate_modal_window_open_for_testing_(false) { 188 simulate_modal_window_open_for_testing_(false) {
189 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_.get());
190 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_ALTERNATE, screen_.get()); 189 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_ALTERNATE, screen_.get());
191 ui_controls::InstallUIControlsAura(internal::CreateUIControls()); 190 ui_controls::InstallUIControlsAura(internal::CreateUIControls());
192 #if defined(OS_CHROMEOS) 191 #if defined(OS_CHROMEOS)
193 content::GpuFeatureType blacklisted_features = 192 content::GpuFeatureType blacklisted_features =
194 content::GpuDataManager::GetInstance()->GetBlacklistedFeatures(); 193 content::GpuDataManager::GetInstance()->GetBlacklistedFeatures();
195 bool is_panel_fitting_disabled = 194 bool is_panel_fitting_disabled =
196 (blacklisted_features & content::GPU_FEATURE_TYPE_PANEL_FITTING) || 195 (blacklisted_features & content::GPU_FEATURE_TYPE_PANEL_FITTING) ||
197 CommandLine::ForCurrentProcess()->HasSwitch( 196 CommandLine::ForCurrentProcess()->HasSwitch(
198 switches::kAshDisablePanelFitting); 197 switches::kAshDisablePanelFitting);
199 output_configurator_->Init(!is_panel_fitting_disabled); 198 output_configurator_->Init(!is_panel_fitting_disabled);
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 return GetInstance()->display_controller()->GetPrimaryRootWindow(); 316 return GetInstance()->display_controller()->GetPrimaryRootWindow();
318 } 317 }
319 318
320 // static 319 // static
321 aura::RootWindow* Shell::GetActiveRootWindow() { 320 aura::RootWindow* Shell::GetActiveRootWindow() {
322 return GetInstance()->active_root_window_; 321 return GetInstance()->active_root_window_;
323 } 322 }
324 323
325 // static 324 // static
326 gfx::Screen* Shell::GetScreen() { 325 gfx::Screen* Shell::GetScreen() {
327 return gfx::Screen::GetScreenFor(GetPrimaryRootWindow()); 326 return gfx::Screen::GetScreenByType(gfx::SCREEN_TYPE_ALTERNATE);
328 } 327 }
329 328
330 // static 329 // static
331 Shell::RootWindowList Shell::GetAllRootWindows() { 330 Shell::RootWindowList Shell::GetAllRootWindows() {
332 return Shell::GetInstance()->display_controller()-> 331 return Shell::GetInstance()->display_controller()->
333 GetAllRootWindows(); 332 GetAllRootWindows();
334 } 333 }
335 334
336 // static 335 // static
337 aura::Window* Shell::GetContainer(aura::RootWindow* root_window, 336 aura::Window* Shell::GetContainer(aura::RootWindow* root_window,
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 iter != controllers.end(); ++iter) { 757 iter != controllers.end(); ++iter) {
759 if ((*iter)->GetSystemModalLayoutManager(window)-> 758 if ((*iter)->GetSystemModalLayoutManager(window)->
760 CanWindowReceiveEvents(window)) { 759 CanWindowReceiveEvents(window)) {
761 return true; 760 return true;
762 } 761 }
763 } 762 }
764 return false; 763 return false;
765 } 764 }
766 765
767 } // namespace ash 766 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | chrome/app/chrome_dll.rc » ('j') | chrome/browser/ui/views/chrome_views_delegate.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698