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

Side by Side Diff: ui/views/controls/menu/menu_controller_aura.cc

Issue 14222019: Trying to activate a window in a workspace other than the current is ignored while a system modal d… (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 8 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
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 "ui/views/controls/menu/menu_controller.h" 5 #include "ui/views/controls/menu/menu_controller.h"
6 6
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "ui/aura/client/activation_change_observer.h" 8 #include "ui/aura/client/activation_change_observer.h"
9 #include "ui/aura/client/activation_client.h" 9 #include "ui/aura/client/activation_client.h"
10 #include "ui/aura/client/dispatcher_client.h" 10 #include "ui/aura/client/dispatcher_client.h"
(...skipping 27 matching lines...) Expand all
38 virtual ~ActivationChangeObserverImpl() { 38 virtual ~ActivationChangeObserverImpl() {
39 Cleanup(); 39 Cleanup();
40 } 40 }
41 41
42 // aura::client::ActivationChangeObserver overrides: 42 // aura::client::ActivationChangeObserver overrides:
43 virtual void OnWindowActivated(aura::Window* gained_active, 43 virtual void OnWindowActivated(aura::Window* gained_active,
44 aura::Window* lost_active) OVERRIDE { 44 aura::Window* lost_active) OVERRIDE {
45 if (!controller_->drag_in_progress()) 45 if (!controller_->drag_in_progress())
46 controller_->CancelAll(); 46 controller_->CancelAll();
47 } 47 }
48 virtual void OnWindowActivationRequestCompleted(
49 aura::Window* request_active, aura::Window* actual_active) OVERRIDE {
50 }
48 51
49 // aura::WindowObserver overrides: 52 // aura::WindowObserver overrides:
50 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE { 53 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE {
51 Cleanup(); 54 Cleanup();
52 } 55 }
53 56
54 // ui::EventHandler overrides: 57 // ui::EventHandler overrides:
55 virtual void OnCancelMode(ui::CancelModeEvent* event) OVERRIDE { 58 virtual void OnCancelMode(ui::CancelModeEvent* event) OVERRIDE {
56 controller_->CancelAll(); 59 controller_->CancelAll();
57 } 60 }
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 } 109 }
107 110
108 gfx::Screen* MenuController::GetScreen() { 111 gfx::Screen* MenuController::GetScreen() {
109 aura::RootWindow* root = GetOwnerRootWindow(owner_); 112 aura::RootWindow* root = GetOwnerRootWindow(owner_);
110 return root ? 113 return root ?
111 gfx::Screen::GetScreenFor(root) : gfx::Screen::GetNativeScreen(); 114 gfx::Screen::GetScreenFor(root) : gfx::Screen::GetNativeScreen();
112 } 115 }
113 116
114 117
115 } // namespace views 118 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698