| 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/touch_hud/mus/touch_hud_application.h" | 5 #include "ash/touch_hud/mus/touch_hud_application.h" |
| 6 | 6 |
| 7 #include "ash/public/interfaces/container.mojom.h" | 7 #include "ash/public/interfaces/container.mojom.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/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 window_manager_connection_->pointer_watcher_event_router() | 35 window_manager_connection_->pointer_watcher_event_router() |
| 36 ->AddPointerWatcher(this, true /* want_moves */); | 36 ->AddPointerWatcher(this, true /* want_moves */); |
| 37 } | 37 } |
| 38 ~TouchHudUI() override { | 38 ~TouchHudUI() override { |
| 39 window_manager_connection_->pointer_watcher_event_router() | 39 window_manager_connection_->pointer_watcher_event_router() |
| 40 ->RemovePointerWatcher(this); | 40 ->RemovePointerWatcher(this); |
| 41 } | 41 } |
| 42 | 42 |
| 43 private: | 43 private: |
| 44 // Overridden from views::WidgetDelegate: | 44 // Overridden from views::WidgetDelegate: |
| 45 views::View* GetContentsView() override { return this; } | |
| 46 base::string16 GetWindowTitle() const override { | 45 base::string16 GetWindowTitle() const override { |
| 47 // TODO(beng): use resources. | 46 // TODO(beng): use resources. |
| 48 return base::ASCIIToUTF16("TouchHud"); | 47 return base::ASCIIToUTF16("TouchHud"); |
| 49 } | 48 } |
| 50 | 49 |
| 51 // Overridden from views::PointerWatcher: | 50 // Overridden from views::PointerWatcher: |
| 52 void OnPointerEventObserved(const ui::PointerEvent& event, | 51 void OnPointerEventObserved(const ui::PointerEvent& event, |
| 53 const gfx::Point& location_in_screen, | 52 const gfx::Point& location_in_screen, |
| 54 views::Widget* target) override { | 53 views::Widget* target) override { |
| 55 if (event.IsTouchPointerEvent()) | 54 if (event.IsTouchPointerEvent()) |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 } | 106 } |
| 108 | 107 |
| 109 void TouchHudApplication::Create(const shell::Identity& remote_identity, | 108 void TouchHudApplication::Create(const shell::Identity& remote_identity, |
| 110 mash::mojom::LaunchableRequest request) { | 109 mash::mojom::LaunchableRequest request) { |
| 111 binding_.Close(); | 110 binding_.Close(); |
| 112 binding_.Bind(std::move(request)); | 111 binding_.Bind(std::move(request)); |
| 113 } | 112 } |
| 114 | 113 |
| 115 } // namespace touch_hud | 114 } // namespace touch_hud |
| 116 } // namespace ash | 115 } // namespace ash |
| OLD | NEW |