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

Side by Side Diff: webkit/glue/webclipboard_impl.cc

Issue 10966025: Change bookmarkManager API from experimental to private. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: bookmarkManager->bookmarkManagerPrivate Created 8 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « chrome/test/data/extensions/api_test/bookmark_manager/standard/test.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "webkit/glue/webclipboard_impl.h" 5 #include "webkit/glue/webclipboard_impl.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/pickle.h" 8 #include "base/pickle.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 WebDropData data_object(data); 236 WebDropData data_object(data);
237 // TODO(dcheng): Properly support text/uri-list here. 237 // TODO(dcheng): Properly support text/uri-list here.
238 if (!data_object.text.is_null()) 238 if (!data_object.text.is_null())
239 scw.WriteText(data_object.text.string()); 239 scw.WriteText(data_object.text.string());
240 if (!data_object.html.is_null()) 240 if (!data_object.html.is_null())
241 scw.WriteHTML(data_object.html.string(), ""); 241 scw.WriteHTML(data_object.html.string(), "");
242 // If there is no custom data, avoid calling WritePickledData. This ensures 242 // If there is no custom data, avoid calling WritePickledData. This ensures
243 // that ScopedClipboardWriterGlue's dtor remains a no-op if the page didn't 243 // that ScopedClipboardWriterGlue's dtor remains a no-op if the page didn't
244 // modify the DataTransfer object, which is important to avoid stomping on 244 // modify the DataTransfer object, which is important to avoid stomping on
245 // any clipboard contents written by extension functions such as 245 // any clipboard contents written by extension functions such as
246 // chrome.experimental.bookmarkManager.copy. 246 // chrome.bookmarkManagerPrivate.copy.
247 if (!data_object.custom_data.empty()) { 247 if (!data_object.custom_data.empty()) {
248 Pickle pickle; 248 Pickle pickle;
249 ui::WriteCustomDataToPickle(data_object.custom_data, &pickle); 249 ui::WriteCustomDataToPickle(data_object.custom_data, &pickle);
250 scw.WritePickledData(pickle, ui::Clipboard::GetWebCustomDataFormatType()); 250 scw.WritePickledData(pickle, ui::Clipboard::GetWebCustomDataFormatType());
251 } 251 }
252 } 252 }
253 253
254 bool WebClipboardImpl::ConvertBufferType(Buffer buffer, 254 bool WebClipboardImpl::ConvertBufferType(Buffer buffer,
255 ui::Clipboard::Buffer* result) { 255 ui::Clipboard::Buffer* result) {
256 switch (buffer) { 256 switch (buffer) {
(...skipping 12 matching lines...) Expand all
269 #endif 269 #endif
270 #endif 270 #endif
271 default: 271 default:
272 NOTREACHED(); 272 NOTREACHED();
273 return false; 273 return false;
274 } 274 }
275 return true; 275 return true;
276 } 276 }
277 277
278 } // namespace webkit_glue 278 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « chrome/test/data/extensions/api_test/bookmark_manager/standard/test.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698