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

Side by Side Diff: ash/touch_hud/mus/touch_hud_application.cc

Issue 2471033005: Adds DesktopWindowTreeHostMus (Closed)
Patch Set: fix Created 4 years, 1 month 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 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 "ash/touch_hud/mus/touch_hud_application.h" 5 #include "ash/touch_hud/mus/touch_hud_application.h"
6 6
7 #include "ash/public/cpp/shell_window_ids.h" 7 #include "ash/public/cpp/shell_window_ids.h"
8 #include "ash/touch_hud/touch_hud_renderer.h" 8 #include "ash/touch_hud/touch_hud_renderer.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ptr_util.h"
10 #include "base/strings/utf_string_conversions.h" 11 #include "base/strings/utf_string_conversions.h"
11 #include "services/service_manager/public/cpp/connector.h" 12 #include "services/service_manager/public/cpp/connector.h"
12 #include "services/ui/public/cpp/property_type_converters.h" 13 #include "services/ui/public/cpp/property_type_converters.h"
13 #include "services/ui/public/interfaces/window_manager_constants.mojom.h" 14 #include "services/ui/public/interfaces/window_manager_constants.mojom.h"
14 #include "ui/views/mus/aura_init.h" 15 #include "ui/views/mus/aura_init.h"
15 #include "ui/views/mus/native_widget_mus.h" 16 #include "ui/views/mus/native_widget_mus.h"
16 #include "ui/views/mus/pointer_watcher_event_router.h" 17 #include "ui/views/mus/pointer_watcher_event_router.h"
17 #include "ui/views/mus/window_manager_connection.h" 18 #include "ui/views/mus/window_manager_connection.h"
18 #include "ui/views/pointer_watcher.h" 19 #include "ui/views/pointer_watcher.h"
19 #include "ui/views/widget/widget.h" 20 #include "ui/views/widget/widget.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 views::WindowManagerConnection* window_manager_connection_; 59 views::WindowManagerConnection* window_manager_connection_;
59 TouchHudRenderer* touch_hud_renderer_; 60 TouchHudRenderer* touch_hud_renderer_;
60 61
61 DISALLOW_COPY_AND_ASSIGN(TouchHudUI); 62 DISALLOW_COPY_AND_ASSIGN(TouchHudUI);
62 }; 63 };
63 64
64 TouchHudApplication::TouchHudApplication() : binding_(this) {} 65 TouchHudApplication::TouchHudApplication() : binding_(this) {}
65 TouchHudApplication::~TouchHudApplication() {} 66 TouchHudApplication::~TouchHudApplication() {}
66 67
67 void TouchHudApplication::OnStart(const service_manager::ServiceInfo& info) { 68 void TouchHudApplication::OnStart(const service_manager::ServiceInfo& info) {
68 aura_init_.reset(new views::AuraInit(connector(), "views_mus_resources.pak")); 69 aura_init_ = base::MakeUnique<views::AuraInit>(connector(), info.identity,
70 "views_mus_resources.pak");
69 window_manager_connection_ = 71 window_manager_connection_ =
70 views::WindowManagerConnection::Create(connector(), info.identity); 72 views::WindowManagerConnection::Create(connector(), info.identity);
71 } 73 }
72 74
73 bool TouchHudApplication::OnConnect( 75 bool TouchHudApplication::OnConnect(
74 const service_manager::ServiceInfo& remote_info, 76 const service_manager::ServiceInfo& remote_info,
75 service_manager::InterfaceRegistry* registry) { 77 service_manager::InterfaceRegistry* registry) {
76 registry->AddInterface<mash::mojom::Launchable>(this); 78 registry->AddInterface<mash::mojom::Launchable>(this);
77 return true; 79 return true;
78 } 80 }
(...skipping 29 matching lines...) Expand all
108 110
109 void TouchHudApplication::Create( 111 void TouchHudApplication::Create(
110 const service_manager::Identity& remote_identity, 112 const service_manager::Identity& remote_identity,
111 mash::mojom::LaunchableRequest request) { 113 mash::mojom::LaunchableRequest request) {
112 binding_.Close(); 114 binding_.Close();
113 binding_.Bind(std::move(request)); 115 binding_.Bind(std::move(request));
114 } 116 }
115 117
116 } // namespace touch_hud 118 } // namespace touch_hud
117 } // namespace ash 119 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698