| OLD | NEW |
| 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/autoclick/mus/autoclick_application.h" | 5 #include "ash/autoclick/mus/autoclick_application.h" |
| 6 | 6 |
| 7 #include "ash/public/cpp/shell_window_ids.h" | 7 #include "ash/public/cpp/shell_window_ids.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 AutoclickControllerCommon* autoclick_controller_common_; | 70 AutoclickControllerCommon* autoclick_controller_common_; |
| 71 | 71 |
| 72 DISALLOW_COPY_AND_ASSIGN(AutoclickUI); | 72 DISALLOW_COPY_AND_ASSIGN(AutoclickUI); |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 AutoclickApplication::AutoclickApplication() | 75 AutoclickApplication::AutoclickApplication() |
| 76 : launchable_binding_(this), autoclick_binding_(this) {} | 76 : launchable_binding_(this), autoclick_binding_(this) {} |
| 77 | 77 |
| 78 AutoclickApplication::~AutoclickApplication() {} | 78 AutoclickApplication::~AutoclickApplication() {} |
| 79 | 79 |
| 80 void AutoclickApplication::OnStart(service_manager::ServiceContext* context) { | 80 void AutoclickApplication::OnStart() { |
| 81 aura_init_ = base::MakeUnique<views::AuraInit>( | 81 aura_init_ = base::MakeUnique<views::AuraInit>( |
| 82 context->connector(), context->identity(), "views_mus_resources.pak"); | 82 context()->connector(), context()->identity(), "views_mus_resources.pak"); |
| 83 window_manager_connection_ = views::WindowManagerConnection::Create( | 83 window_manager_connection_ = views::WindowManagerConnection::Create( |
| 84 context->connector(), context->identity()); | 84 context()->connector(), context()->identity()); |
| 85 autoclick_controller_common_.reset(new AutoclickControllerCommon( | 85 autoclick_controller_common_.reset(new AutoclickControllerCommon( |
| 86 base::TimeDelta::FromMilliseconds(kDefaultAutoclickDelayMs), this)); | 86 base::TimeDelta::FromMilliseconds(kDefaultAutoclickDelayMs), this)); |
| 87 } | 87 } |
| 88 | 88 |
| 89 bool AutoclickApplication::OnConnect( | 89 bool AutoclickApplication::OnConnect( |
| 90 const service_manager::ServiceInfo& remote_info, | 90 const service_manager::ServiceInfo& remote_info, |
| 91 service_manager::InterfaceRegistry* registry) { | 91 service_manager::InterfaceRegistry* registry) { |
| 92 registry->AddInterface<mash::mojom::Launchable>(this); | 92 registry->AddInterface<mash::mojom::Launchable>(this); |
| 93 registry->AddInterface<mojom::AutoclickController>(this); | 93 registry->AddInterface<mojom::AutoclickController>(this); |
| 94 return true; | 94 return true; |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 // TODO(riajiang): Currently not working. Need to know how to generate events | 159 // TODO(riajiang): Currently not working. Need to know how to generate events |
| 160 // in mus world (crbug.com/628665). | 160 // in mus world (crbug.com/628665). |
| 161 } | 161 } |
| 162 | 162 |
| 163 void AutoclickApplication::OnAutoclickCanceled() { | 163 void AutoclickApplication::OnAutoclickCanceled() { |
| 164 // Not used in mus. | 164 // Not used in mus. |
| 165 } | 165 } |
| 166 | 166 |
| 167 } // namespace autoclick | 167 } // namespace autoclick |
| 168 } // namespace ash | 168 } // namespace ash |
| OLD | NEW |