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

Side by Side Diff: services/ui/test_wm/test_wm.cc

Issue 2125883003: Adds ability for pre-target accelerators to not consume events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « services/ui/public/interfaces/window_tree.mojom ('k') | services/ui/ws/event_dispatcher.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "mojo/public/c/system/main.h" 5 #include "mojo/public/c/system/main.h"
6 #include "mojo/public/cpp/bindings/binding.h" 6 #include "mojo/public/cpp/bindings/binding.h"
7 #include "services/shell/public/cpp/application_runner.h" 7 #include "services/shell/public/cpp/application_runner.h"
8 #include "services/shell/public/cpp/connector.h" 8 #include "services/shell/public/cpp/connector.h"
9 #include "services/shell/public/cpp/service.h" 9 #include "services/shell/public/cpp/service.h"
10 #include "services/ui/public/cpp/window.h" 10 #include "services/ui/public/cpp/window.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 DCHECK(!root_); 79 DCHECK(!root_);
80 root_ = window; 80 root_ = window;
81 DCHECK(window_manager_client_); 81 DCHECK(window_manager_client_);
82 window_manager_client_->AddActivationParent(root_); 82 window_manager_client_->AddActivationParent(root_);
83 ui::mojom::FrameDecorationValuesPtr frame_decoration_values = 83 ui::mojom::FrameDecorationValuesPtr frame_decoration_values =
84 ui::mojom::FrameDecorationValues::New(); 84 ui::mojom::FrameDecorationValues::New();
85 frame_decoration_values->max_title_bar_button_width = 0; 85 frame_decoration_values->max_title_bar_button_width = 0;
86 window_manager_client_->SetFrameDecorationValues( 86 window_manager_client_->SetFrameDecorationValues(
87 std::move(frame_decoration_values)); 87 std::move(frame_decoration_values));
88 } 88 }
89 void OnAccelerator(uint32_t id, const ui::Event& event) override {
90 // Don't care.
91 }
92 void OnWmPerformMoveLoop(Window* window, 89 void OnWmPerformMoveLoop(Window* window,
93 mojom::MoveLoopSource source, 90 mojom::MoveLoopSource source,
94 const gfx::Point& cursor_location, 91 const gfx::Point& cursor_location,
95 const base::Callback<void(bool)>& on_done) override { 92 const base::Callback<void(bool)>& on_done) override {
96 // Don't care. 93 // Don't care.
97 } 94 }
98 void OnWmCancelMoveLoop(Window* window) override {} 95 void OnWmCancelMoveLoop(Window* window) override {}
99 96
100 ui::Window* root_ = nullptr; 97 ui::Window* root_ = nullptr;
101 ui::WindowManagerClient* window_manager_client_ = nullptr; 98 ui::WindowManagerClient* window_manager_client_ = nullptr;
102 // See WindowTreeClient for details on ownership. 99 // See WindowTreeClient for details on ownership.
103 ui::WindowTreeClient* window_tree_client_ = nullptr; 100 ui::WindowTreeClient* window_tree_client_ = nullptr;
104 101
105 DISALLOW_COPY_AND_ASSIGN(TestWM); 102 DISALLOW_COPY_AND_ASSIGN(TestWM);
106 }; 103 };
107 104
108 } // namespace test 105 } // namespace test
109 } // namespace ui 106 } // namespace ui
110 107
111 MojoResult MojoMain(MojoHandle shell_handle) { 108 MojoResult MojoMain(MojoHandle shell_handle) {
112 shell::ApplicationRunner runner(new ui::test::TestWM); 109 shell::ApplicationRunner runner(new ui::test::TestWM);
113 return runner.Run(shell_handle); 110 return runner.Run(shell_handle);
114 } 111 }
OLDNEW
« no previous file with comments | « services/ui/public/interfaces/window_tree.mojom ('k') | services/ui/ws/event_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698