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

Side by Side Diff: chrome/browser/ui/views/omnibox/omnibox_view_win.cc

Issue 9232075: Have ScopedClipboardWriter and Clipboard::WriteObjects take a buffer parameter. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fix build error. Created 8 years, 10 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
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 "chrome/browser/ui/views/omnibox/omnibox_view_win.h" 5 #include "chrome/browser/ui/views/omnibox/omnibox_view_win.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <locale> 8 #include <locale>
9 #include <string> 9 #include <string>
10 10
(...skipping 1344 matching lines...) Expand 10 before | Expand all | Expand 10 after
1355 if (text.empty()) 1355 if (text.empty())
1356 return; 1356 return;
1357 1357
1358 CHARRANGE sel; 1358 CHARRANGE sel;
1359 GURL url; 1359 GURL url;
1360 bool write_url = false; 1360 bool write_url = false;
1361 GetSel(sel); 1361 GetSel(sel);
1362 // GetSel() doesn't preserve selection direction, so sel.cpMin will always be 1362 // GetSel() doesn't preserve selection direction, so sel.cpMin will always be
1363 // the smaller value. 1363 // the smaller value.
1364 model_->AdjustTextForCopy(sel.cpMin, IsSelectAll(), &text, &url, &write_url); 1364 model_->AdjustTextForCopy(sel.cpMin, IsSelectAll(), &text, &url, &write_url);
1365 ui::ScopedClipboardWriter scw(g_browser_process->clipboard()); 1365 ui::ScopedClipboardWriter scw(g_browser_process->clipboard(),
1366 ui::Clipboard::BUFFER_STANDARD);
1366 scw.WriteText(text); 1367 scw.WriteText(text);
1367 if (write_url) { 1368 if (write_url) {
1368 scw.WriteBookmark(text, url.spec()); 1369 scw.WriteBookmark(text, url.spec());
1369 scw.WriteHyperlink(net::EscapeForHTML(text), url.spec()); 1370 scw.WriteHyperlink(net::EscapeForHTML(text), url.spec());
1370 } 1371 }
1371 } 1372 }
1372 1373
1373 void OmniboxViewWin::OnCut() { 1374 void OmniboxViewWin::OnCut() {
1374 OnCopy(); 1375 OnCopy();
1375 1376
(...skipping 1336 matching lines...) Expand 10 before | Expand all | Expand 10 after
2712 return omnibox_view; 2713 return omnibox_view;
2713 } 2714 }
2714 return new OmniboxViewWin(controller, 2715 return new OmniboxViewWin(controller,
2715 toolbar_model, 2716 toolbar_model,
2716 location_bar, 2717 location_bar,
2717 command_updater, 2718 command_updater,
2718 popup_window_mode, 2719 popup_window_mode,
2719 location_bar); 2720 location_bar);
2720 } 2721 }
2721 #endif 2722 #endif
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_view_views.cc ('k') | chrome_frame/test/chrome_frame_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698