diff options
author | msw <msw@chromium.org> | 2016-01-05 12:52:06 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-05 20:53:17 +0000 |
commit | c3cf79da59cb85d095bd0bac53c4d22566af700a (patch) | |
tree | 2207473a65c475d65808b29ed2422a327493479f /ash/shell | |
parent | 43eac5874dfac275da4b4d964316a86430f5303a (diff) | |
download | chromium_src-c3cf79da59cb85d095bd0bac53c4d22566af700a.zip chromium_src-c3cf79da59cb85d095bd0bac53c4d22566af700a.tar.gz chromium_src-c3cf79da59cb85d095bd0bac53c4d22566af700a.tar.bz2 |
Remove unused WindowWatcher pointer from Ash [Shell|Shelf]Delegate.
Other minor cleanup; no functionality changes.
BUG=NONE
TEST=Ash compliles and works as expected.
R=sky@chromium.org
Review URL: https://codereview.chromium.org/1555403002
Cr-Commit-Position: refs/heads/master@{#367644}
Diffstat (limited to 'ash/shell')
-rw-r--r-- | ash/shell/content/client/shell_browser_main_parts.cc | 6 | ||||
-rw-r--r-- | ash/shell/shelf_delegate_impl.cc | 8 | ||||
-rw-r--r-- | ash/shell/shelf_delegate_impl.h | 13 | ||||
-rw-r--r-- | ash/shell/shell_delegate_impl.cc | 14 | ||||
-rw-r--r-- | ash/shell/shell_delegate_impl.h | 6 |
5 files changed, 7 insertions, 40 deletions
diff --git a/ash/shell/content/client/shell_browser_main_parts.cc b/ash/shell/content/client/shell_browser_main_parts.cc index 588731c..2a9613b 100644 --- a/ash/shell/content/client/shell_browser_main_parts.cc +++ b/ash/shell/content/client/shell_browser_main_parts.cc @@ -82,7 +82,7 @@ class ShellViewsDelegate : public views::TestViewsDelegate { ShellBrowserMainParts::ShellBrowserMainParts( const content::MainFunctionParams& parameters) - : BrowserMainParts(), delegate_(NULL) {} + : BrowserMainParts(), delegate_(nullptr) {} ShellBrowserMainParts::~ShellBrowserMainParts() {} @@ -136,7 +136,6 @@ void ShellBrowserMainParts::PreMainMessageLoopRun() { window_watcher_.reset(new ash::shell::WindowWatcher); gfx::Screen* screen = Shell::GetInstance()->GetScreen(); screen->AddObserver(window_watcher_.get()); - delegate_->SetWatcher(window_watcher_.get()); ash::shell::InitWindowTypeLauncher(); @@ -148,8 +147,7 @@ void ShellBrowserMainParts::PostMainMessageLoopRun() { screen->RemoveObserver(window_watcher_.get()); window_watcher_.reset(); - delegate_->SetWatcher(NULL); - delegate_ = NULL; + delegate_ = nullptr; ash::Shell::DeleteInstance(); ShellContentState::DestroyInstance(); // The global message center state must be shutdown absent diff --git a/ash/shell/shelf_delegate_impl.cc b/ash/shell/shelf_delegate_impl.cc index a61a575..b77da8b 100644 --- a/ash/shell/shelf_delegate_impl.cc +++ b/ash/shell/shelf_delegate_impl.cc @@ -4,18 +4,12 @@ #include "ash/shell/shelf_delegate_impl.h" -#include "ash/shell.h" -#include "ash/shell/toplevel_window.h" -#include "ash/shell/window_watcher.h" -#include "ash/wm/window_util.h" #include "base/strings/string_util.h" namespace ash { namespace shell { -ShelfDelegateImpl::ShelfDelegateImpl(WindowWatcher* watcher) - : watcher_(watcher) { -} +ShelfDelegateImpl::ShelfDelegateImpl() {} ShelfDelegateImpl::~ShelfDelegateImpl() { } diff --git a/ash/shell/shelf_delegate_impl.h b/ash/shell/shelf_delegate_impl.h index 85d68ed..b80021ba5 100644 --- a/ash/shell/shelf_delegate_impl.h +++ b/ash/shell/shelf_delegate_impl.h @@ -9,22 +9,14 @@ #include "base/compiler_specific.h" #include "base/macros.h" -namespace aura { -class Window; -} - namespace ash { namespace shell { -class WindowWatcher; - class ShelfDelegateImpl : public ShelfDelegate { public: - explicit ShelfDelegateImpl(WindowWatcher* watcher); + ShelfDelegateImpl(); ~ShelfDelegateImpl() override; - void set_watcher(WindowWatcher* watcher) { watcher_ = watcher; } - // ShelfDelegate overrides: void OnShelfCreated(Shelf* shelf) override; void OnShelfDestroyed(Shelf* shelf) override; @@ -36,9 +28,6 @@ class ShelfDelegateImpl : public ShelfDelegate { void UnpinAppWithID(const std::string& app_id) override; private: - // Used to update Launcher. Owned by main. - WindowWatcher* watcher_; - DISALLOW_COPY_AND_ASSIGN(ShelfDelegateImpl); }; diff --git a/ash/shell/shell_delegate_impl.cc b/ash/shell/shell_delegate_impl.cc index 38fbe8e..b7a1858 100644 --- a/ash/shell/shell_delegate_impl.cc +++ b/ash/shell/shell_delegate_impl.cc @@ -137,17 +137,9 @@ class SessionStateDelegateImpl : public SessionStateDelegate { } // namespace -ShellDelegateImpl::ShellDelegateImpl() - : watcher_(NULL), shelf_delegate_(NULL) {} +ShellDelegateImpl::ShellDelegateImpl() : shelf_delegate_(nullptr) {} -ShellDelegateImpl::~ShellDelegateImpl() { -} - -void ShellDelegateImpl::SetWatcher(WindowWatcher* watcher) { - watcher_ = watcher; - if (shelf_delegate_) - shelf_delegate_->set_watcher(watcher); -} +ShellDelegateImpl::~ShellDelegateImpl() {} bool ShellDelegateImpl::IsFirstRunAfterBoot() const { return false; @@ -205,7 +197,7 @@ app_list::AppListViewDelegate* ShellDelegateImpl::GetAppListViewDelegate() { } ShelfDelegate* ShellDelegateImpl::CreateShelfDelegate(ShelfModel* model) { - shelf_delegate_ = new ShelfDelegateImpl(watcher_); + shelf_delegate_ = new ShelfDelegateImpl(); return shelf_delegate_; } diff --git a/ash/shell/shell_delegate_impl.h b/ash/shell/shell_delegate_impl.h index c98e1b2..dbcaa59 100644 --- a/ash/shell/shell_delegate_impl.h +++ b/ash/shell/shell_delegate_impl.h @@ -19,15 +19,12 @@ namespace ash { namespace shell { class ShelfDelegateImpl; -class WindowWatcher; class ShellDelegateImpl : public ash::ShellDelegate { public: ShellDelegateImpl(); ~ShellDelegateImpl() override; - void SetWatcher(WindowWatcher* watcher); - bool IsFirstRunAfterBoot() const override; bool IsIncognitoAllowed() const override; bool IsMultiProfilesEnabled() const override; @@ -59,9 +56,6 @@ class ShellDelegateImpl : public ash::ShellDelegate { gfx::Image GetDeprecatedAcceleratorImage() const override; private: - // Used to update Launcher. Owned by main. - WindowWatcher* watcher_; - ShelfDelegateImpl* shelf_delegate_; scoped_ptr<app_list::AppListViewDelegate> app_list_view_delegate_; |