diff options
author | sadrul <sadrul@chromium.org> | 2016-01-30 05:52:09 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-01-30 13:53:16 +0000 |
commit | b3e8c9584ef48f805a7332323efe47eb78a39bec (patch) | |
tree | f0aff668d42f031a95cb5122289f7d124d3a9796 /ui/wm/public | |
parent | 1af4fada49c4f3890f16daac31d38379a9d782b2 (diff) | |
download | chromium_src-b3e8c9584ef48f805a7332323efe47eb78a39bec.zip chromium_src-b3e8c9584ef48f805a7332323efe47eb78a39bec.tar.gz chromium_src-b3e8c9584ef48f805a7332323efe47eb78a39bec.tar.bz2 |
ash/wm: Remove dead code.
This removes the following code:
. DispatcherRunLoop, because it is used only in three unit-tests, two of
which are disabled.
. DispatcherClient, because it is used only by DispatcherRunLoop.
. Implementions of DispatcherClient for dekstop (DesktopDispatcherClient)
and chromeos (NestedAcceleratorController).
. NestedAcceleratorDispatcher, since NestedAcceleratorController was the
only thing using it.
. NestedAcceleratorDelegate, since NestedAcceleratorDispatcher was the
only thing using it.
BUG=none
Review URL: https://codereview.chromium.org/1647933002
Cr-Commit-Position: refs/heads/master@{#372548}
Diffstat (limited to 'ui/wm/public')
-rw-r--r-- | ui/wm/public/dispatcher_client.cc | 52 | ||||
-rw-r--r-- | ui/wm/public/dispatcher_client.h | 59 |
2 files changed, 0 insertions, 111 deletions
diff --git a/ui/wm/public/dispatcher_client.cc b/ui/wm/public/dispatcher_client.cc deleted file mode 100644 index e3be7ca..0000000 --- a/ui/wm/public/dispatcher_client.cc +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "ui/wm/public/dispatcher_client.h" - -#include "base/callback.h" -#include "ui/aura/window.h" -#include "ui/aura/window_property.h" - -DECLARE_WINDOW_PROPERTY_TYPE(aura::client::DispatcherClient*); - -namespace aura { -namespace client { - -DispatcherRunLoop::DispatcherRunLoop(DispatcherClient* client, - base::MessagePumpDispatcher* dispatcher) { - client->PrepareNestedLoopClosures(dispatcher, &run_closure_, &quit_closure_); -} - -DispatcherRunLoop::~DispatcherRunLoop() { -} - -void DispatcherRunLoop::Run() { - base::MessageLoopForUI* loop = base::MessageLoopForUI::current(); - base::MessageLoopForUI::ScopedNestableTaskAllower allow_nested(loop); - run_closure_.Run(); -} - -base::Closure DispatcherRunLoop::QuitClosure() { - return quit_closure_; -} - -void DispatcherRunLoop::Quit() { - quit_closure_.Run(); -} - -DEFINE_LOCAL_WINDOW_PROPERTY_KEY(DispatcherClient*, kDispatcherClientKey, NULL); - -void SetDispatcherClient(Window* root_window, DispatcherClient* client) { - DCHECK_EQ(root_window->GetRootWindow(), root_window); - root_window->SetProperty(kDispatcherClientKey, client); -} - -DispatcherClient* GetDispatcherClient(Window* root_window) { - if (root_window) - DCHECK_EQ(root_window->GetRootWindow(), root_window); - return root_window ? root_window->GetProperty(kDispatcherClientKey) : NULL; -} - -} // namespace client -} // namespace aura diff --git a/ui/wm/public/dispatcher_client.h b/ui/wm/public/dispatcher_client.h deleted file mode 100644 index a301e92..0000000 --- a/ui/wm/public/dispatcher_client.h +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef UI_WM_PUBLIC_DISPATCHER_CLIENT_H_ -#define UI_WM_PUBLIC_DISPATCHER_CLIENT_H_ - -#include "base/callback.h" -#include "base/macros.h" -#include "base/message_loop/message_pump_dispatcher.h" -#include "ui/aura/aura_export.h" - -namespace aura { -class Window; -namespace client { - -class DispatcherClient; - -// A base::RunLoop like object for running a nested message-loop with a -// specified DispatcherClient and a MessagePumpDispatcher. -class AURA_EXPORT DispatcherRunLoop { - public: - DispatcherRunLoop(DispatcherClient* client, - base::MessagePumpDispatcher* dispatcher); - ~DispatcherRunLoop(); - - void Run(); - base::Closure QuitClosure(); - void Quit(); - - private: - base::Closure run_closure_; - base::Closure quit_closure_; - - DISALLOW_COPY_AND_ASSIGN(DispatcherRunLoop); -}; - -// An interface implemented by an object which handles nested dispatchers. -class AURA_EXPORT DispatcherClient { - public: - virtual ~DispatcherClient() {} - - protected: - friend class DispatcherRunLoop; - - virtual void PrepareNestedLoopClosures( - base::MessagePumpDispatcher* dispatcher, - base::Closure* run_closure, - base::Closure* quit_closure) = 0; -}; - -AURA_EXPORT void SetDispatcherClient(Window* root_window, - DispatcherClient* client); -AURA_EXPORT DispatcherClient* GetDispatcherClient(Window* root_window); - -} // namespace client -} // namespace aura - -#endif // UI_WM_PUBLIC_DISPATCHER_CLIENT_H_ |