| Index: ash/accelerators/accelerator_router.cc
|
| diff --git a/ash/accelerators/accelerator_router.cc b/ash/accelerators/accelerator_router.cc
|
| index 553bd2434568f3fa1076161f5baf599a9cdb8b59..20e67d7bc4f7de0c08ca9bb9cfb9d7e8a97f8fe4 100644
|
| --- a/ash/accelerators/accelerator_router.cc
|
| +++ b/ash/accelerators/accelerator_router.cc
|
| @@ -8,11 +8,12 @@
|
| #include "ash/shell.h"
|
| #include "ash/shell_port.h"
|
| #include "ash/wm/window_state.h"
|
| -#include "ash/wm_window.h"
|
| #include "base/metrics/histogram_macros.h"
|
| #include "base/stl_util.h"
|
| +#include "ui/aura/window.h"
|
| #include "ui/base/accelerators/accelerator.h"
|
| #include "ui/events/event.h"
|
| +#include "ui/wm/core/window_util.h"
|
|
|
| namespace ash {
|
|
|
| @@ -43,7 +44,7 @@ AcceleratorRouter::AcceleratorRouter() {}
|
|
|
| AcceleratorRouter::~AcceleratorRouter() {}
|
|
|
| -bool AcceleratorRouter::ProcessAccelerator(WmWindow* target,
|
| +bool AcceleratorRouter::ProcessAccelerator(aura::Window* target,
|
| const ui::KeyEvent& key_event,
|
| const ui::Accelerator& accelerator) {
|
| // Callers should never supply null.
|
| @@ -85,16 +86,16 @@ void AcceleratorRouter::RecordSearchKeyStats(
|
| }
|
| }
|
|
|
| -bool AcceleratorRouter::CanConsumeSystemKeys(WmWindow* target,
|
| +bool AcceleratorRouter::CanConsumeSystemKeys(aura::Window* target,
|
| const ui::KeyEvent& event) {
|
| // Uses the top level window so if the target is a web contents window the
|
| // containing parent window will be checked for the property.
|
| - WmWindow* top_level = target->GetToplevelWindowForFocus();
|
| - return top_level && top_level->GetWindowState()->can_consume_system_keys();
|
| + aura::Window* top_level = ::wm::GetToplevelWindow(target);
|
| + return top_level && wm::GetWindowState(top_level)->can_consume_system_keys();
|
| }
|
|
|
| bool AcceleratorRouter::ShouldProcessAcceleratorNow(
|
| - WmWindow* target,
|
| + aura::Window* target,
|
| const ui::KeyEvent& event,
|
| const ui::Accelerator& accelerator) {
|
| // Callers should never supply null.
|
| @@ -104,7 +105,7 @@ bool AcceleratorRouter::ShouldProcessAcceleratorNow(
|
| if (accelerator.IsCmdDown())
|
| return true;
|
|
|
| - if (base::ContainsValue(ShellPort::Get()->GetAllRootWindows(), target))
|
| + if (base::ContainsValue(Shell::GetAllRootWindows(), target))
|
| return true;
|
|
|
| AcceleratorController* accelerator_controller =
|
| @@ -116,8 +117,8 @@ bool AcceleratorRouter::ShouldProcessAcceleratorNow(
|
|
|
| // A full screen window has a right to handle all key events including the
|
| // reserved ones.
|
| - WmWindow* top_level = target->GetToplevelWindowForFocus();
|
| - if (top_level && top_level->GetWindowState()->IsFullscreen()) {
|
| + aura::Window* top_level = ::wm::GetToplevelWindow(target);
|
| + if (top_level && wm::GetWindowState(top_level)->IsFullscreen()) {
|
| // On ChromeOS, fullscreen windows are either browser or apps, which
|
| // send key events to a web content first, then will process keys
|
| // if the web content didn't consume them.
|
|
|