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

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

Issue 2099513003: mus: Use the new drag API to implement tab dragging in chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dragging-part-1
Patch Set: Rebase to tot Created 4 years, 5 months 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
« no previous file with comments | « ui/views/mus/window_manager_connection.h ('k') | ui/views/widget/widget_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_manager_connection.h" 5 #include "ui/views/mus/window_manager_connection.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/threading/thread_local.h" 10 #include "base/threading/thread_local.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 } 94 }
95 95
96 void WindowManagerConnection::RemovePointerWatcher(PointerWatcher* watcher) { 96 void WindowManagerConnection::RemovePointerWatcher(PointerWatcher* watcher) {
97 pointer_watchers_.RemoveObserver(watcher); 97 pointer_watchers_.RemoveObserver(watcher);
98 if (!HasPointerWatcher()) { 98 if (!HasPointerWatcher()) {
99 // Last PointerWatcher removed, stop the event observer. 99 // Last PointerWatcher removed, stop the event observer.
100 client_->SetEventObserver(nullptr); 100 client_->SetEventObserver(nullptr);
101 } 101 }
102 } 102 }
103 103
104 const std::set<ui::Window*>& WindowManagerConnection::GetRoots() const {
105 return client_->GetRoots();
106 }
107
104 WindowManagerConnection::WindowManagerConnection( 108 WindowManagerConnection::WindowManagerConnection(
105 shell::Connector* connector, 109 shell::Connector* connector,
106 const shell::Identity& identity) 110 const shell::Identity& identity)
107 : connector_(connector), identity_(identity) { 111 : connector_(connector), identity_(identity) {
108 lazy_tls_ptr.Pointer()->Set(this); 112 lazy_tls_ptr.Pointer()->Set(this);
109 113
110 ui::GpuService::Initialize(connector); 114 ui::GpuService::Initialize(connector);
111 115
112 client_.reset(new ui::WindowTreeClient(this, nullptr, nullptr)); 116 client_.reset(new ui::WindowTreeClient(this, nullptr, nullptr));
113 client_->ConnectViaWindowTreeFactory(connector_); 117 client_->ConnectViaWindowTreeFactory(connector_);
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 void WindowManagerConnection::OnWindowManagerFrameValuesChanged() { 189 void WindowManagerConnection::OnWindowManagerFrameValuesChanged() {
186 if (client_) 190 if (client_)
187 NativeWidgetMus::NotifyFrameChanged(client_.get()); 191 NativeWidgetMus::NotifyFrameChanged(client_.get());
188 } 192 }
189 193
190 gfx::Point WindowManagerConnection::GetCursorScreenPoint() { 194 gfx::Point WindowManagerConnection::GetCursorScreenPoint() {
191 return client_->GetCursorScreenPoint(); 195 return client_->GetCursorScreenPoint();
192 } 196 }
193 197
194 } // namespace views 198 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/mus/window_manager_connection.h ('k') | ui/views/widget/widget_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698