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

Unified Diff: ui/views/mus/window_manager_connection.cc

Issue 2211253002: mus/views: Create a mus OSExchangeData::Provider stub, and use it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix DCHECK. Fixed unit tests? Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/mus/window_manager_connection.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/mus/window_manager_connection.cc
diff --git a/ui/views/mus/window_manager_connection.cc b/ui/views/mus/window_manager_connection.cc
index a16ed87092f9cffeb1c1324231104bd4901211ba..fccfb9ec84aa0aae86c80abcf996f7273e12e793 100644
--- a/ui/views/mus/window_manager_connection.cc
+++ b/ui/views/mus/window_manager_connection.cc
@@ -7,6 +7,7 @@
#include <utility>
#include "base/lazy_instance.h"
+#include "base/memory/ptr_util.h"
#include "base/threading/thread_local.h"
#include "services/shell/public/cpp/connection.h"
#include "services/shell/public/cpp/connector.h"
@@ -19,6 +20,7 @@
#include "services/ui/public/interfaces/window_tree.mojom.h"
#include "ui/views/mus/clipboard_mus.h"
#include "ui/views/mus/native_widget_mus.h"
+#include "ui/views/mus/os_exchange_data_provider_mus.h"
#include "ui/views/mus/screen_mus.h"
#include "ui/views/pointer_watcher.h"
#include "ui/views/touch_event_watcher.h"
@@ -40,6 +42,7 @@ WindowManagerConnection::~WindowManagerConnection() {
// ~WindowTreeClient calls back to us (we're its delegate), destroy it while
// we are still valid.
client_.reset();
+ ui::OSExchangeDataProviderFactory::SetFactory(nullptr);
ui::Clipboard::DestroyClipboardForCurrentThread();
gpu_service_.reset();
lazy_tls_ptr.Pointer()->Set(nullptr);
@@ -161,6 +164,8 @@ WindowManagerConnection::WindowManagerConnection(
clipboard->Init(connector);
ui::Clipboard::SetClipboardForCurrentThread(std::move(clipboard));
+ ui::OSExchangeDataProviderFactory::SetFactory(this);
+
ViewsDelegate::GetInstance()->set_native_widget_factory(base::Bind(
&WindowManagerConnection::CreateNativeWidgetMus,
base::Unretained(this),
@@ -236,4 +241,9 @@ gfx::Point WindowManagerConnection::GetCursorScreenPoint() {
return client_->GetCursorScreenPoint();
}
+std::unique_ptr<OSExchangeData::Provider>
+WindowManagerConnection::BuildProvider() {
+ return base::MakeUnique<OSExchangeDataProviderMus>();
+}
+
} // namespace views
« no previous file with comments | « ui/views/mus/window_manager_connection.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698