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

Side by Side Diff: ui/ozone/demo/ozone_demo.cc

Issue 1560293002: Rename KEY_ constants to avoid conflict with <linux/input.h> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments (Wez) 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <utility> 5 #include <utility>
6 6
7 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/scoped_vector.h" 10 #include "base/memory/scoped_vector.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 139
140 void Quit() { 140 void Quit() {
141 window_manager_->Quit(); 141 window_manager_->Quit();
142 } 142 }
143 143
144 // PlatformWindowDelegate: 144 // PlatformWindowDelegate:
145 void OnBoundsChanged(const gfx::Rect& new_bounds) override {} 145 void OnBoundsChanged(const gfx::Rect& new_bounds) override {}
146 void OnDamageRect(const gfx::Rect& damaged_region) override {} 146 void OnDamageRect(const gfx::Rect& damaged_region) override {}
147 void DispatchEvent(ui::Event* event) override { 147 void DispatchEvent(ui::Event* event) override {
148 if (event->IsKeyEvent() && 148 if (event->IsKeyEvent() &&
149 static_cast<ui::KeyEvent*>(event)->code() == ui::DomCode::KEY_Q) 149 static_cast<ui::KeyEvent*>(event)->code() == ui::DomCode::US_Q)
150 Quit(); 150 Quit();
151 } 151 }
152 void OnCloseRequest() override { Quit(); } 152 void OnCloseRequest() override { Quit(); }
153 void OnClosed() override {} 153 void OnClosed() override {}
154 void OnWindowStateChanged(ui::PlatformWindowState new_state) override {} 154 void OnWindowStateChanged(ui::PlatformWindowState new_state) override {}
155 void OnLostCapture() override {} 155 void OnLostCapture() override {}
156 void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget, 156 void OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget,
157 float device_pixel_ratio) override { 157 float device_pixel_ratio) override {
158 DCHECK_NE(widget, gfx::kNullAcceleratedWidget); 158 DCHECK_NE(widget, gfx::kNullAcceleratedWidget);
159 widget_ = widget; 159 widget_ = widget;
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 ->SetCurrentLayoutByName("us"); 337 ->SetCurrentLayoutByName("us");
338 338
339 base::RunLoop run_loop; 339 base::RunLoop run_loop;
340 340
341 WindowManager window_manager(run_loop.QuitClosure()); 341 WindowManager window_manager(run_loop.QuitClosure());
342 342
343 run_loop.Run(); 343 run_loop.Run();
344 344
345 return 0; 345 return 0;
346 } 346 }
OLDNEW
« no previous file with comments | « ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine_unittest.cc ('k') | ui/views/cocoa/bridged_content_view.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698