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

Unified Diff: ui/base/x/selection_owner.h

Issue 17029020: linux_aura: Redo how memory is handled in clipboard/drag code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes for sky; ptal Created 7 years, 6 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/base/dragdrop/os_exchange_data_provider_aurax11.cc ('k') | ui/base/x/selection_owner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/x/selection_owner.h
diff --git a/ui/base/x/selection_owner.h b/ui/base/x/selection_owner.h
index a62be5250ad847193510c76b632e2b9780f13021..6c5c7f83fd62560d0dbdcf356a07abac02be68f7 100644
--- a/ui/base/x/selection_owner.h
+++ b/ui/base/x/selection_owner.h
@@ -15,12 +15,11 @@
#include "base/basictypes.h"
#include "base/callback.h"
#include "ui/base/ui_export.h"
+#include "ui/base/x/selection_utils.h"
#include "ui/base/x/x11_atom_cache.h"
namespace ui {
-class SelectionFormatMap;
-
// Owns a specific X11 selection on an X window.
//
// The selection owner object keeps track of which xwindow is the current
@@ -34,14 +33,14 @@ class UI_EXPORT SelectionOwner {
~SelectionOwner();
// Returns the current selection data. Useful for fast paths.
- SelectionFormatMap* selection_format_map() { return selection_data_.get(); }
+ const SelectionFormatMap& selection_format_map() { return format_map_; }
// Retrieves a list of types we're offering.
void RetrieveTargets(std::vector<Atom>* targets);
// Attempts to take ownership of the selection. If we're successful, present
// |data| to other windows.
- void TakeOwnershipOfSelection(scoped_ptr<SelectionFormatMap> data);
+ void TakeOwnershipOfSelection(const SelectionFormatMap& data);
// Releases the selection (if we own it) and clears any data we own.
void Clear();
@@ -61,7 +60,7 @@ class UI_EXPORT SelectionOwner {
::Atom selection_name_;
// The data we are currently serving.
- scoped_ptr<SelectionFormatMap> selection_data_;
+ SelectionFormatMap format_map_;
X11AtomCache atom_cache_;
« no previous file with comments | « ui/base/dragdrop/os_exchange_data_provider_aurax11.cc ('k') | ui/base/x/selection_owner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698