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

Side by Side Diff: ash/shell.cc

Issue 11189021: fix for 156227, 153077, 134093 (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: move #if to outside of fct def 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
« no previous file with comments | « ash/shell.h ('k') | chrome/browser/chromeos/options/wifi_config_view.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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 179
180 Shell::Shell(ShellDelegate* delegate) 180 Shell::Shell(ShellDelegate* delegate)
181 : screen_(new ScreenAsh), 181 : screen_(new ScreenAsh),
182 active_root_window_(NULL), 182 active_root_window_(NULL),
183 delegate_(delegate), 183 delegate_(delegate),
184 #if defined(OS_CHROMEOS) 184 #if defined(OS_CHROMEOS)
185 output_configurator_(new chromeos::OutputConfigurator()), 185 output_configurator_(new chromeos::OutputConfigurator()),
186 output_configurator_animation_( 186 output_configurator_animation_(
187 new internal::OutputConfiguratorAnimation()), 187 new internal::OutputConfiguratorAnimation()),
188 #endif // defined(OS_CHROMEOS) 188 #endif // defined(OS_CHROMEOS)
189 browser_context_(NULL) { 189 browser_context_(NULL),
190 simulate_modal_window_open_for_testing_(false) {
190 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_.get()); 191 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_.get());
191 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_ALTERNATE, screen_.get()); 192 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_ALTERNATE, screen_.get());
192 ui_controls::InstallUIControlsAura(internal::CreateUIControls()); 193 ui_controls::InstallUIControlsAura(internal::CreateUIControls());
193 #if defined(OS_CHROMEOS) 194 #if defined(OS_CHROMEOS)
194 content::GpuFeatureType blacklisted_features = 195 content::GpuFeatureType blacklisted_features =
195 content::GpuDataManager::GetInstance()->GetBlacklistedFeatures(); 196 content::GpuDataManager::GetInstance()->GetBlacklistedFeatures();
196 bool is_panel_fitting_disabled = 197 bool is_panel_fitting_disabled =
197 (blacklisted_features & content::GPU_FEATURE_TYPE_PANEL_FITTING) || 198 (blacklisted_features & content::GPU_FEATURE_TYPE_PANEL_FITTING) ||
198 CommandLine::ForCurrentProcess()->HasSwitch( 199 CommandLine::ForCurrentProcess()->HasSwitch(
199 switches::kAshDisablePanelFitting); 200 switches::kAshDisablePanelFitting);
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 532
532 aura::Window* Shell::GetAppListWindow() { 533 aura::Window* Shell::GetAppListWindow() {
533 return app_list_controller_.get() ? app_list_controller_->GetWindow() : NULL; 534 return app_list_controller_.get() ? app_list_controller_->GetWindow() : NULL;
534 } 535 }
535 536
536 bool Shell::IsScreenLocked() const { 537 bool Shell::IsScreenLocked() const {
537 return !delegate_.get() || delegate_->IsScreenLocked(); 538 return !delegate_.get() || delegate_->IsScreenLocked();
538 } 539 }
539 540
540 bool Shell::IsModalWindowOpen() const { 541 bool Shell::IsModalWindowOpen() const {
542 if (simulate_modal_window_open_for_testing_)
543 return true;
541 // TODO(oshima): Walk though all root windows. 544 // TODO(oshima): Walk though all root windows.
542 const aura::Window* modal_container = GetContainer( 545 const aura::Window* modal_container = GetContainer(
543 GetPrimaryRootWindow(), 546 GetPrimaryRootWindow(),
544 internal::kShellWindowId_SystemModalContainer); 547 internal::kShellWindowId_SystemModalContainer);
545 return !modal_container->children().empty(); 548 return !modal_container->children().empty();
546 } 549 }
547 550
548 views::NonClientFrameView* Shell::CreateDefaultNonClientFrameView( 551 views::NonClientFrameView* Shell::CreateDefaultNonClientFrameView(
549 views::Widget* widget) { 552 views::Widget* widget) {
550 if (CommandLine::ForCurrentProcess()->HasSwitch( 553 if (CommandLine::ForCurrentProcess()->HasSwitch(
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 iter != controllers.end(); ++iter) { 761 iter != controllers.end(); ++iter) {
759 if ((*iter)->GetSystemModalLayoutManager(window)-> 762 if ((*iter)->GetSystemModalLayoutManager(window)->
760 CanWindowReceiveEvents(window)) { 763 CanWindowReceiveEvents(window)) {
761 return true; 764 return true;
762 } 765 }
763 } 766 }
764 return false; 767 return false;
765 } 768 }
766 769
767 } // namespace ash 770 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell.h ('k') | chrome/browser/chromeos/options/wifi_config_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698