| Index: athena/wm/window_manager_impl.cc
|
| diff --git a/athena/wm/window_manager_impl.cc b/athena/wm/window_manager_impl.cc
|
| index 47e49b64584e8948dc8408d24f1f17a7e993b4bd..357baa5018590af8da47b63bb6cce8b3226e9bb8 100644
|
| --- a/athena/wm/window_manager_impl.cc
|
| +++ b/athena/wm/window_manager_impl.cc
|
| @@ -47,6 +47,7 @@ class WindowManagerImpl : public WindowManager,
|
| private:
|
| enum Command {
|
| CMD_TOGGLE_OVERVIEW,
|
| + CMD_TOGGLE_SPLIT_VIEW,
|
| };
|
|
|
| // Sets whether overview mode is active.
|
| @@ -163,7 +164,7 @@ void WindowManagerImpl::ToggleOverview() {
|
| }
|
|
|
| bool WindowManagerImpl::IsOverviewModeActive() {
|
| - return overview_;
|
| + return !!overview_;
|
| }
|
|
|
| void WindowManagerImpl::SetInOverview(bool active) {
|
| @@ -179,9 +180,8 @@ void WindowManagerImpl::SetInOverview(bool active) {
|
| aura::Window::Windows::iterator it;
|
| for (it = window_list.begin(); it != window_list.end(); ++it)
|
| container_->StackChildAtTop(*it);
|
| - overview_ = WindowOverviewMode::Create(container_.get(),
|
| - mru_window_tracker_.get(),
|
| - this);
|
| + overview_ = WindowOverviewMode::Create(
|
| + container_.get(), mru_window_tracker_.get(), this);
|
| } else {
|
| overview_.reset();
|
| FOR_EACH_OBSERVER(WindowManagerObserver, observers_,
|
| @@ -193,6 +193,8 @@ void WindowManagerImpl::InstallAccelerators() {
|
| const AcceleratorData accelerator_data[] = {
|
| {TRIGGER_ON_PRESS, ui::VKEY_F6, ui::EF_NONE, CMD_TOGGLE_OVERVIEW,
|
| AF_NONE},
|
| + {TRIGGER_ON_PRESS, ui::VKEY_F6, ui::EF_CONTROL_DOWN,
|
| + CMD_TOGGLE_SPLIT_VIEW, AF_NONE},
|
| };
|
| AcceleratorManager::Get()->RegisterAccelerators(
|
| accelerator_data, arraysize(accelerator_data), this);
|
| @@ -213,6 +215,8 @@ void WindowManagerImpl::OnSelectWindow(aura::Window* window) {
|
| }
|
|
|
| void WindowManagerImpl::OnWindowAdded(aura::Window* new_window) {
|
| + // TODO(oshima): Creating a new window should simply updates the overview
|
| + // mode.
|
| if (new_window->type() == ui::wm::WINDOW_TYPE_NORMAL)
|
| SetInOverview(false);
|
| }
|
| @@ -232,6 +236,9 @@ bool WindowManagerImpl::OnAcceleratorFired(int command_id,
|
| case CMD_TOGGLE_OVERVIEW:
|
| ToggleOverview();
|
| break;
|
| + case CMD_TOGGLE_SPLIT_VIEW:
|
| + split_view_controller_->ToggleSplitView();
|
| + break;
|
| }
|
| return true;
|
| }
|
|
|