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

Side by Side Diff: ash/shell.cc

Issue 10977088: Fix for Ash shortcuts unexpectedly working in system model dialog (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: impl. of review comments 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 177
178 Shell::Shell(ShellDelegate* delegate) 178 Shell::Shell(ShellDelegate* delegate)
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 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_.get()); 189 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_.get());
189 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_ALTERNATE, screen_.get()); 190 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_ALTERNATE, screen_.get());
190 ui_controls::InstallUIControlsAura(internal::CreateUIControls()); 191 ui_controls::InstallUIControlsAura(internal::CreateUIControls());
191 #if defined(OS_CHROMEOS) 192 #if defined(OS_CHROMEOS)
192 output_configurator_->AddObserver(output_configurator_animation_.get()); 193 output_configurator_->AddObserver(output_configurator_animation_.get());
193 base::MessagePumpAuraX11::Current()->AddDispatcherForRootWindow( 194 base::MessagePumpAuraX11::Current()->AddDispatcherForRootWindow(
194 output_configurator()); 195 output_configurator());
195 #endif // defined(OS_CHROMEOS) 196 #endif // defined(OS_CHROMEOS)
196 } 197 }
197 198
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 522
522 aura::Window* Shell::GetAppListWindow() { 523 aura::Window* Shell::GetAppListWindow() {
523 return app_list_controller_.get() ? app_list_controller_->GetWindow() : NULL; 524 return app_list_controller_.get() ? app_list_controller_->GetWindow() : NULL;
524 } 525 }
525 526
526 bool Shell::IsScreenLocked() const { 527 bool Shell::IsScreenLocked() const {
527 return !delegate_.get() || delegate_->IsScreenLocked(); 528 return !delegate_.get() || delegate_->IsScreenLocked();
528 } 529 }
529 530
530 bool Shell::IsModalWindowOpen() const { 531 bool Shell::IsModalWindowOpen() const {
532 if (simulate_modal_window_open_for_testing_)
533 return true;
531 // TODO(oshima): Walk though all root windows. 534 // TODO(oshima): Walk though all root windows.
532 const aura::Window* modal_container = GetContainer( 535 const aura::Window* modal_container = GetContainer(
533 GetPrimaryRootWindow(), 536 GetPrimaryRootWindow(),
534 internal::kShellWindowId_SystemModalContainer); 537 internal::kShellWindowId_SystemModalContainer);
535 return !modal_container->children().empty(); 538 return !modal_container->children().empty();
536 } 539 }
537 540
538 views::NonClientFrameView* Shell::CreateDefaultNonClientFrameView( 541 views::NonClientFrameView* Shell::CreateDefaultNonClientFrameView(
539 views::Widget* widget) { 542 views::Widget* widget) {
540 if (CommandLine::ForCurrentProcess()->HasSwitch( 543 if (CommandLine::ForCurrentProcess()->HasSwitch(
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
748 iter != controllers.end(); ++iter) { 751 iter != controllers.end(); ++iter) {
749 if ((*iter)->GetSystemModalLayoutManager(window)-> 752 if ((*iter)->GetSystemModalLayoutManager(window)->
750 CanWindowReceiveEvents(window)) { 753 CanWindowReceiveEvents(window)) {
751 return true; 754 return true;
752 } 755 }
753 } 756 }
754 return false; 757 return false;
755 } 758 }
756 759
757 } // namespace ash 760 } // 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