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

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

Issue 2011833003: Implement ui::ClipboardMus. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Patch cleanup. Created 4 years, 7 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
« ui/views/mus/clipboard_mus.cc ('K') | « 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 e6280123a8e1d489bc6fcdba777f3c5bacfb0b0a..870662fac744a0c696fc46daab0242d3c1ac494b 100644
--- a/ui/views/mus/window_manager_connection.cc
+++ b/ui/views/mus/window_manager_connection.cc
@@ -18,6 +18,7 @@
#include "services/shell/public/cpp/connector.h"
#include "ui/events/devices/device_data_manager.h"
#include "ui/gfx/geometry/mojo/geometry_type_converters.h"
+#include "ui/views/mus/clipboard_mus.h"
#include "ui/views/mus/native_widget_mus.h"
#include "ui/views/mus/screen_mus.h"
#include "ui/views/pointer_watcher.h"
@@ -110,6 +111,10 @@ WindowManagerConnection::WindowManagerConnection(
screen_.reset(new ScreenMus(this));
screen_->Init(connector);
+ clipboard_ = new ClipboardMus;
+ clipboard_->Init(connector);
+ ui::Clipboard::SetClipboardForCurrentThread(clipboard_);
+
// TODO(sad): We should have a DeviceDataManager implementation that talks to
// a mojo service to learn about the input-devices on the system.
// http://crbug.com/601981
@@ -126,6 +131,8 @@ WindowManagerConnection::~WindowManagerConnection() {
// destroy it while we are still valid.
window_tree_connection_.reset();
+ ui::Clipboard::DestroyClipboardForCurrentThread();
+
ui::DeviceDataManager::DeleteInstance();
}
« ui/views/mus/clipboard_mus.cc ('K') | « 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