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

Side by Side Diff: ui/views/mus/mus_client.cc

Issue 2507963002: Implement hit tests/client area. (Closed)
Patch Set: Really fix compile 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 "ui/views/mus/mus_client.h" 5 #include "ui/views/mus/mus_client.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "services/service_manager/public/cpp/connection.h" 9 #include "services/service_manager/public/cpp/connection.h"
10 #include "services/service_manager/public/cpp/connector.h" 10 #include "services/service_manager/public/cpp/connector.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 native_widget->SetDesktopWindowTreeHost( 71 native_widget->SetDesktopWindowTreeHost(
72 base::WrapUnique(init_params.desktop_window_tree_host)); 72 base::WrapUnique(init_params.desktop_window_tree_host));
73 } else { 73 } else {
74 native_widget->SetDesktopWindowTreeHost( 74 native_widget->SetDesktopWindowTreeHost(
75 base::MakeUnique<DesktopWindowTreeHostMus>(delegate, native_widget, 75 base::MakeUnique<DesktopWindowTreeHostMus>(delegate, native_widget,
76 init_params)); 76 init_params));
77 } 77 }
78 return native_widget; 78 return native_widget;
79 } 79 }
80 80
81 void MusClient::AddObserver(MusClientObserver* observer) {
82 observer_list_.AddObserver(observer);
83 }
84
85 void MusClient::RemoveObserver(MusClientObserver* observer) {
86 observer_list_.RemoveObserver(observer);
87 }
88
81 MusClient::MusClient(service_manager::Connector* connector, 89 MusClient::MusClient(service_manager::Connector* connector,
82 const service_manager::Identity& identity, 90 const service_manager::Identity& identity,
83 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner) 91 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner)
84 : connector_(connector), identity_(identity) { 92 : connector_(connector), identity_(identity) {
85 DCHECK(!instance_); 93 DCHECK(!instance_);
86 instance_ = this; 94 instance_ = this;
87 // TODO(msw): Avoid this... use some default value? Allow clients to extend? 95 // TODO(msw): Avoid this... use some default value? Allow clients to extend?
88 property_converter_ = base::MakeUnique<aura::PropertyConverter>(); 96 property_converter_ = base::MakeUnique<aura::PropertyConverter>();
89 97
90 wm_state_ = base::MakeUnique<wm::WMState>(); 98 wm_state_ = base::MakeUnique<wm::WMState>();
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 } 136 }
129 137
130 void MusClient::OnPointerEventObserved(const ui::PointerEvent& event, 138 void MusClient::OnPointerEventObserved(const ui::PointerEvent& event,
131 aura::Window* target) { 139 aura::Window* target) {
132 // TODO: wire up PointerWatcherEventRouter. http://crbug.com/663526. 140 // TODO: wire up PointerWatcherEventRouter. http://crbug.com/663526.
133 NOTIMPLEMENTED(); 141 NOTIMPLEMENTED();
134 } 142 }
135 143
136 void MusClient::OnWindowManagerFrameValuesChanged() { 144 void MusClient::OnWindowManagerFrameValuesChanged() {
137 // TODO: wire up client area. http://crbug.com/663525. 145 // TODO: wire up client area. http://crbug.com/663525.
138 NOTIMPLEMENTED(); 146 for (auto& observer : observer_list_)
147 observer.OnWindowManagerFrameValuesChanged();
139 } 148 }
140 149
141 aura::client::CaptureClient* MusClient::GetCaptureClient() { 150 aura::client::CaptureClient* MusClient::GetCaptureClient() {
142 return wm::CaptureController::Get(); 151 return wm::CaptureController::Get();
143 } 152 }
144 153
145 aura::PropertyConverter* MusClient::GetPropertyConverter() { 154 aura::PropertyConverter* MusClient::GetPropertyConverter() {
146 return property_converter_.get(); 155 return property_converter_.get();
147 } 156 }
148 157
(...skipping 13 matching lines...) Expand all
162 return root->GetTopWindowContainingPoint(relative_point); 171 return root->GetTopWindowContainingPoint(relative_point);
163 } 172 }
164 return nullptr; 173 return nullptr;
165 } 174 }
166 175
167 std::unique_ptr<OSExchangeData::Provider> MusClient::BuildProvider() { 176 std::unique_ptr<OSExchangeData::Provider> MusClient::BuildProvider() {
168 return base::MakeUnique<aura::OSExchangeDataProviderMus>(); 177 return base::MakeUnique<aura::OSExchangeDataProviderMus>();
169 } 178 }
170 179
171 } // namespace views 180 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698