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

Side by Side Diff: services/ui/ws/platform_display.cc

Issue 2795503002: mash: Don't synthesize extra key press events in the window server (Closed)
Patch Set: remove InputMethodBridge workaround Created 3 years, 8 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/ws/display.cc ('k') | services/ui/ws/platform_display_default.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 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 "services/ui/ws/platform_display.h" 5 #include "services/ui/ws/platform_display.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "services/ui/ws/platform_display_default.h" 8 #include "services/ui/ws/platform_display_default.h"
9 #include "services/ui/ws/platform_display_factory.h" 9 #include "services/ui/ws/platform_display_factory.h"
10 #include "services/ui/ws/server_window.h" 10 #include "services/ui/ws/server_window.h"
11 #include "ui/base/cursor/image_cursors.h"
11 12
12 namespace ui { 13 namespace ui {
13 namespace ws { 14 namespace ws {
14 15
15 // static 16 // static
16 PlatformDisplayFactory* PlatformDisplay::factory_ = nullptr; 17 PlatformDisplayFactory* PlatformDisplay::factory_ = nullptr;
17 18
18 // static 19 // static
19 std::unique_ptr<PlatformDisplay> PlatformDisplay::Create( 20 std::unique_ptr<PlatformDisplay> PlatformDisplay::Create(
20 ServerWindow* root, 21 ServerWindow* root,
21 const display::ViewportMetrics& metrics) { 22 const display::ViewportMetrics& metrics) {
22 if (factory_) 23 if (factory_)
23 return factory_->CreatePlatformDisplay(root, metrics); 24 return factory_->CreatePlatformDisplay(root, metrics);
24 25
25 return base::MakeUnique<PlatformDisplayDefault>(root, metrics); 26 #if defined(OS_ANDROID)
27 return base::MakeUnique<PlatformDisplayDefault>(root, metrics,
28 nullptr /* image_cursors */);
29 #else
30 return base::MakeUnique<PlatformDisplayDefault>(
31 root, metrics, base::MakeUnique<ImageCursors>());
32 #endif
26 } 33 }
27 34
28 } // namespace ws 35 } // namespace ws
29 } // namespace ui 36 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/display.cc ('k') | services/ui/ws/platform_display_default.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698