OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "ui/views/mus/window_tree_host_mus.h" | 5 #include "ui/views/mus/window_tree_host_mus.h" |
6 | 6 |
7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
8 #include "services/ui/public/cpp/window.h" | 8 #include "services/ui/public/cpp/window.h" |
9 #include "ui/aura/env.h" | 9 #include "ui/aura/env.h" |
10 #include "ui/aura/window.h" | 10 #include "ui/aura/window.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 | 62 |
63 input_method_ = base::MakeUnique<InputMethodMus>(this, window); | 63 input_method_ = base::MakeUnique<InputMethodMus>(this, window); |
64 SetSharedInputMethod(input_method_.get()); | 64 SetSharedInputMethod(input_method_.get()); |
65 } | 65 } |
66 | 66 |
67 WindowTreeHostMus::~WindowTreeHostMus() { | 67 WindowTreeHostMus::~WindowTreeHostMus() { |
68 DestroyCompositor(); | 68 DestroyCompositor(); |
69 DestroyDispatcher(); | 69 DestroyDispatcher(); |
70 } | 70 } |
71 | 71 |
72 void WindowTreeHostMus::InitInputMethod(shell::Connector* connector) { | 72 void WindowTreeHostMus::InitInputMethod(service_manager::Connector* connector) { |
73 input_method_->Init(connector); | 73 input_method_->Init(connector); |
74 } | 74 } |
75 | 75 |
76 void WindowTreeHostMus::DispatchEvent(ui::Event* event) { | 76 void WindowTreeHostMus::DispatchEvent(ui::Event* event) { |
77 if (event->IsKeyEvent() && GetInputMethod()) { | 77 if (event->IsKeyEvent() && GetInputMethod()) { |
78 GetInputMethod()->DispatchKeyEvent(event->AsKeyEvent()); | 78 GetInputMethod()->DispatchKeyEvent(event->AsKeyEvent()); |
79 return; | 79 return; |
80 } | 80 } |
81 WindowTreeHostPlatform::DispatchEvent(event); | 81 WindowTreeHostPlatform::DispatchEvent(event); |
82 } | 82 } |
(...skipping 16 matching lines...) Expand all Loading... |
99 void WindowTreeHostMus::OnCloseRequest() { | 99 void WindowTreeHostMus::OnCloseRequest() { |
100 OnHostCloseRequested(); | 100 OnHostCloseRequested(); |
101 } | 101 } |
102 | 102 |
103 gfx::ICCProfile WindowTreeHostMus::GetICCProfileForCurrentDisplay() { | 103 gfx::ICCProfile WindowTreeHostMus::GetICCProfileForCurrentDisplay() { |
104 // TODO: This should read the profile from mus. crbug.com/647510 | 104 // TODO: This should read the profile from mus. crbug.com/647510 |
105 return gfx::ICCProfile(); | 105 return gfx::ICCProfile(); |
106 } | 106 } |
107 | 107 |
108 } // namespace views | 108 } // namespace views |
OLD | NEW |