Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1166)

Unified Diff: ui/wm/core/nested_accelerator_dispatcher_win.cc

Issue 1647933002: ash/wm: Remove dead code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/wm/core/nested_accelerator_dispatcher_linux.cc ('k') | ui/wm/public/dispatcher_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/wm/core/nested_accelerator_dispatcher_win.cc
diff --git a/ui/wm/core/nested_accelerator_dispatcher_win.cc b/ui/wm/core/nested_accelerator_dispatcher_win.cc
deleted file mode 100644
index 1b59d68901758e3ecba0a3bcdb34cb4b44fbda65..0000000000000000000000000000000000000000
--- a/ui/wm/core/nested_accelerator_dispatcher_win.cc
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright 2014 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/core/nested_accelerator_dispatcher.h"
-
-#include <stdint.h>
-
-#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
-#include "base/message_loop/message_pump_dispatcher.h"
-#include "base/run_loop.h"
-#include "ui/base/accelerators/accelerator.h"
-#include "ui/events/event.h"
-#include "ui/wm/core/accelerator_filter.h"
-#include "ui/wm/core/nested_accelerator_delegate.h"
-
-using base::MessagePumpDispatcher;
-
-namespace wm {
-
-namespace {
-
-bool IsKeyEvent(const MSG& msg) {
- return msg.message == WM_KEYDOWN || msg.message == WM_SYSKEYDOWN ||
- msg.message == WM_KEYUP || msg.message == WM_SYSKEYUP;
-}
-
-} // namespace
-
-class NestedAcceleratorDispatcherWin : public NestedAcceleratorDispatcher,
- public MessagePumpDispatcher {
- public:
- NestedAcceleratorDispatcherWin(NestedAcceleratorDelegate* delegate,
- MessagePumpDispatcher* nested)
- : NestedAcceleratorDispatcher(delegate), nested_dispatcher_(nested) {}
- ~NestedAcceleratorDispatcherWin() override {}
-
- private:
- // NestedAcceleratorDispatcher:
- scoped_ptr<base::RunLoop> CreateRunLoop() override {
- return make_scoped_ptr(new base::RunLoop(this));
- }
-
- // MessagePumpDispatcher:
- uint32_t Dispatch(const MSG& event) override {
- if (IsKeyEvent(event)) {
- ui::Accelerator accelerator((ui::KeyEvent(event)));
-
- switch (delegate_->ProcessAccelerator(accelerator)) {
- case NestedAcceleratorDelegate::RESULT_PROCESS_LATER:
- return POST_DISPATCH_QUIT_LOOP;
- case NestedAcceleratorDelegate::RESULT_PROCESSED:
- return POST_DISPATCH_NONE;
- case NestedAcceleratorDelegate::RESULT_NOT_PROCESSED:
- break;
- }
- }
-
- return nested_dispatcher_ ? nested_dispatcher_->Dispatch(event)
- : POST_DISPATCH_PERFORM_DEFAULT;
- }
-
- MessagePumpDispatcher* nested_dispatcher_;
-
- DISALLOW_COPY_AND_ASSIGN(NestedAcceleratorDispatcherWin);
-};
-
-scoped_ptr<NestedAcceleratorDispatcher> NestedAcceleratorDispatcher::Create(
- NestedAcceleratorDelegate* delegate,
- MessagePumpDispatcher* nested_dispatcher) {
- return make_scoped_ptr(
- new NestedAcceleratorDispatcherWin(delegate, nested_dispatcher));
-}
-
-} // namespace wm
« no previous file with comments | « ui/wm/core/nested_accelerator_dispatcher_linux.cc ('k') | ui/wm/public/dispatcher_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698