| 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/interfaces/container.mojom.h" | 7 #include "ash/public/interfaces/container.mojom.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "services/shell/public/cpp/connector.h" | 10 #include "services/shell/public/cpp/connector.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 window_manager_connection_->pointer_watcher_event_router() | 36 window_manager_connection_->pointer_watcher_event_router() |
| 37 ->AddPointerWatcher(this, true /* want_moves */); | 37 ->AddPointerWatcher(this, true /* want_moves */); |
| 38 } | 38 } |
| 39 ~AutoclickUI() override { | 39 ~AutoclickUI() override { |
| 40 window_manager_connection_->pointer_watcher_event_router() | 40 window_manager_connection_->pointer_watcher_event_router() |
| 41 ->RemovePointerWatcher(this); | 41 ->RemovePointerWatcher(this); |
| 42 } | 42 } |
| 43 | 43 |
| 44 private: | 44 private: |
| 45 // Overridden from views::WidgetDelegate: | 45 // Overridden from views::WidgetDelegate: |
| 46 views::View* GetContentsView() override { return this; } | |
| 47 base::string16 GetWindowTitle() const override { | 46 base::string16 GetWindowTitle() const override { |
| 48 // TODO(beng): use resources. | 47 // TODO(beng): use resources. |
| 49 return base::ASCIIToUTF16("Autoclick"); | 48 return base::ASCIIToUTF16("Autoclick"); |
| 50 } | 49 } |
| 51 | 50 |
| 52 // Overridden from views::PointerWatcher: | 51 // Overridden from views::PointerWatcher: |
| 53 void OnPointerEventObserved(const ui::PointerEvent& event, | 52 void OnPointerEventObserved(const ui::PointerEvent& event, |
| 54 const gfx::Point& location_in_screen, | 53 const gfx::Point& location_in_screen, |
| 55 views::Widget* target) override { | 54 views::Widget* target) override { |
| 56 if (event.IsTouchPointerEvent()) { | 55 if (event.IsTouchPointerEvent()) { |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 // TODO(riajiang): Currently not working. Need to know how to generate events | 153 // TODO(riajiang): Currently not working. Need to know how to generate events |
| 155 // in mus world (crbug.com/628665). | 154 // in mus world (crbug.com/628665). |
| 156 } | 155 } |
| 157 | 156 |
| 158 void AutoclickApplication::OnAutoclickCanceled() { | 157 void AutoclickApplication::OnAutoclickCanceled() { |
| 159 // Not used in mus. | 158 // Not used in mus. |
| 160 } | 159 } |
| 161 | 160 |
| 162 } // namespace autoclick | 161 } // namespace autoclick |
| 163 } // namespace ash | 162 } // namespace ash |
| OLD | NEW |