| Index: ash/shell_port.cc
|
| diff --git a/ash/wm_shell.cc b/ash/shell_port.cc
|
| similarity index 78%
|
| rename from ash/wm_shell.cc
|
| rename to ash/shell_port.cc
|
| index 1d553010da49ebba7495d20548b86921a0bbffd2..91c0f6a31367d88b81094947e37298fdd5f0a529 100644
|
| --- a/ash/wm_shell.cc
|
| +++ b/ash/shell_port.cc
|
| @@ -2,7 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "ash/wm_shell.h"
|
| +#include "ash/shell_port.h"
|
|
|
| #include <utility>
|
|
|
| @@ -25,23 +25,22 @@
|
| namespace ash {
|
|
|
| // static
|
| -WmShell* WmShell::instance_ = nullptr;
|
| +ShellPort* ShellPort::instance_ = nullptr;
|
|
|
| -WmShell::~WmShell() {
|
| +ShellPort::~ShellPort() {
|
| DCHECK_EQ(this, instance_);
|
| instance_ = nullptr;
|
| }
|
|
|
| // static
|
| -WmShell* WmShell::Get() {
|
| +ShellPort* ShellPort::Get() {
|
| return instance_;
|
| }
|
|
|
| -void WmShell::Shutdown() {
|
| -}
|
| +void ShellPort::Shutdown() {}
|
|
|
| -void WmShell::ShowContextMenu(const gfx::Point& location_in_screen,
|
| - ui::MenuSourceType source_type) {
|
| +void ShellPort::ShowContextMenu(const gfx::Point& location_in_screen,
|
| + ui::MenuSourceType source_type) {
|
| // Bail if there is no active user session or if the screen is locked.
|
| if (Shell::Get()->session_controller()->NumberOfLoggedInUsers() < 1 ||
|
| Shell::Get()->session_controller()->IsScreenLocked()) {
|
| @@ -53,33 +52,33 @@ void WmShell::ShowContextMenu(const gfx::Point& location_in_screen,
|
| source_type);
|
| }
|
|
|
| -void WmShell::OnLockStateEvent(LockStateObserver::EventType event) {
|
| +void ShellPort::OnLockStateEvent(LockStateObserver::EventType event) {
|
| for (auto& observer : lock_state_observers_)
|
| observer.OnLockStateEvent(event);
|
| }
|
|
|
| -void WmShell::AddLockStateObserver(LockStateObserver* observer) {
|
| +void ShellPort::AddLockStateObserver(LockStateObserver* observer) {
|
| lock_state_observers_.AddObserver(observer);
|
| }
|
|
|
| -void WmShell::RemoveLockStateObserver(LockStateObserver* observer) {
|
| +void ShellPort::RemoveLockStateObserver(LockStateObserver* observer) {
|
| lock_state_observers_.RemoveObserver(observer);
|
| }
|
|
|
| -WmShell::WmShell() {
|
| +ShellPort::ShellPort() {
|
| DCHECK(!instance_);
|
| instance_ = this;
|
| }
|
|
|
| -RootWindowController* WmShell::GetPrimaryRootWindowController() {
|
| +RootWindowController* ShellPort::GetPrimaryRootWindowController() {
|
| return GetPrimaryRootWindow()->GetRootWindowController();
|
| }
|
|
|
| -bool WmShell::IsForceMaximizeOnFirstRun() {
|
| +bool ShellPort::IsForceMaximizeOnFirstRun() {
|
| return Shell::Get()->shell_delegate()->IsForceMaximizeOnFirstRun();
|
| }
|
|
|
| -bool WmShell::IsSystemModalWindowOpen() {
|
| +bool ShellPort::IsSystemModalWindowOpen() {
|
| if (simulate_modal_window_open_for_testing_)
|
| return true;
|
|
|
| @@ -99,7 +98,7 @@ bool WmShell::IsSystemModalWindowOpen() {
|
| return false;
|
| }
|
|
|
| -void WmShell::CreateModalBackground(WmWindow* window) {
|
| +void ShellPort::CreateModalBackground(WmWindow* window) {
|
| for (WmWindow* root_window : GetAllRootWindows()) {
|
| root_window->GetRootWindowController()
|
| ->GetSystemModalLayoutManager(window)
|
| @@ -107,7 +106,7 @@ void WmShell::CreateModalBackground(WmWindow* window) {
|
| }
|
| }
|
|
|
| -void WmShell::OnModalWindowRemoved(WmWindow* removed) {
|
| +void ShellPort::OnModalWindowRemoved(WmWindow* removed) {
|
| WmWindow::Windows root_windows = GetAllRootWindows();
|
| for (WmWindow* root_window : root_windows) {
|
| if (root_window->GetRootWindowController()
|
|
|