summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-24 22:45:56 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-24 22:45:56 +0000
commit9c828e8c488e19be5f2816714cb75f4a1810cc0b (patch)
treef08ef4c8cc9559047387510adf93b9488fe988d9 /chrome/browser
parent2b2f8f72f90cf73a432978b7f42f2abaae9112da (diff)
downloadchromium_src-9c828e8c488e19be5f2816714cb75f4a1810cc0b.zip
chromium_src-9c828e8c488e19be5f2816714cb75f4a1810cc0b.tar.gz
chromium_src-9c828e8c488e19be5f2816714cb75f4a1810cc0b.tar.bz2
Make bookmark_drag_data.cc compile on Posix.
Review URL: http://codereview.chromium.org/31007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10300 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/bookmarks/bookmark_drag_data.cc22
-rw-r--r--chrome/browser/browser.scons1
2 files changed, 22 insertions, 1 deletions
diff --git a/chrome/browser/bookmarks/bookmark_drag_data.cc b/chrome/browser/bookmarks/bookmark_drag_data.cc
index 73ac107..1194751 100644
--- a/chrome/browser/bookmarks/bookmark_drag_data.cc
+++ b/chrome/browser/bookmarks/bookmark_drag_data.cc
@@ -4,19 +4,30 @@
#include "chrome/browser/bookmarks/bookmark_drag_data.h"
+#include "base/basictypes.h"
#include "base/pickle.h"
#include "base/string_util.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
#include "chrome/browser/profile.h"
+
+// TODO(port): Port this file.
+#if defined(OS_WIN)
#include "chrome/common/os_exchange_data.h"
+#else
+#include "chrome/common/temp_scaffolding_stubs.h"
+#endif
+#if defined(OS_WIN)
static CLIPFORMAT clipboard_format = 0;
+#endif
static void RegisterFormat() {
+#if defined(OS_WIN)
if (clipboard_format == 0) {
clipboard_format = RegisterClipboardFormat(L"chrome/x-bookmark-entries");
DCHECK(clipboard_format);
}
+#endif
}
BookmarkDragData::Element::Element(BookmarkNode* node)
@@ -99,7 +110,12 @@ void BookmarkDragData::Write(Profile* profile, OSExchangeData* data) const {
for (size_t i = 0; i < elements.size(); ++i)
elements[i].WriteToPickle(&data_pickle);
+#if defined(OS_WIN)
data->SetPickledData(clipboard_format, data_pickle);
+#else
+ // TODO(port): Clipboard integration.
+ NOTIMPLEMENTED();
+#endif
}
bool BookmarkDragData::Read(const OSExchangeData& data) {
@@ -109,6 +125,7 @@ bool BookmarkDragData::Read(const OSExchangeData& data) {
profile_path_.clear();
+#if defined(OS_WIN)
if (data.HasFormat(clipboard_format)) {
Pickle drag_data_pickle;
if (data.GetPickledData(clipboard_format, &drag_data_pickle)) {
@@ -136,6 +153,11 @@ bool BookmarkDragData::Read(const OSExchangeData& data) {
elements.push_back(element);
}
}
+#else
+ // TODO(port): Clipboard integration.
+ NOTIMPLEMENTED();
+#endif
+
return is_valid();
}
diff --git a/chrome/browser/browser.scons b/chrome/browser/browser.scons
index c39fd5d..030a3fa 100644
--- a/chrome/browser/browser.scons
+++ b/chrome/browser/browser.scons
@@ -671,7 +671,6 @@ if not env.Bit('windows'):
'automation/automation_provider_list.cc',
'automation/ui_controls.cc',
'bookmarks/bookmark_context_menu.cc',
- 'bookmarks/bookmark_drag_data.cc',
'bookmarks/bookmark_drop_info.cc',
'browser_accessibility.cc',
'browser_accessibility_manager.cc',