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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 558913003: Remove clipboard argument from ScopedClipboardWriter constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't leak a clipboard on Windows Created 6 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
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 "content/browser/renderer_host/render_widget_host_view_aura.h" 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 891 matching lines...) Expand 10 before | Expand all | Expand 10 after
902 size_t pos = range.GetMin() - offset; 902 size_t pos = range.GetMin() - offset;
903 size_t n = range.length(); 903 size_t n = range.length();
904 904
905 DCHECK(pos + n <= text.length()) << "The text can not fully cover range."; 905 DCHECK(pos + n <= text.length()) << "The text can not fully cover range.";
906 if (pos >= text.length()) { 906 if (pos >= text.length()) {
907 NOTREACHED() << "The text can not cover range."; 907 NOTREACHED() << "The text can not cover range.";
908 return; 908 return;
909 } 909 }
910 910
911 // Set the CLIPBOARD_TYPE_SELECTION to the ui::Clipboard. 911 // Set the CLIPBOARD_TYPE_SELECTION to the ui::Clipboard.
912 ui::ScopedClipboardWriter clipboard_writer( 912 ui::ScopedClipboardWriter clipboard_writer(ui::CLIPBOARD_TYPE_SELECTION);
913 ui::Clipboard::GetForCurrentThread(),
914 ui::CLIPBOARD_TYPE_SELECTION);
915 clipboard_writer.WriteText(text.substr(pos, n)); 913 clipboard_writer.WriteText(text.substr(pos, n));
916 #endif // defined(USE_X11) && !defined(OS_CHROMEOS) 914 #endif // defined(USE_X11) && !defined(OS_CHROMEOS)
917 } 915 }
918 916
919 gfx::Size RenderWidgetHostViewAura::GetRequestedRendererSize() const { 917 gfx::Size RenderWidgetHostViewAura::GetRequestedRendererSize() const {
920 return delegated_frame_host_->GetRequestedRendererSize(); 918 return delegated_frame_host_->GetRequestedRendererSize();
921 } 919 }
922 920
923 void RenderWidgetHostViewAura::SelectionBoundsChanged( 921 void RenderWidgetHostViewAura::SelectionBoundsChanged(
924 const ViewHostMsg_SelectionBounds_Params& params) { 922 const ViewHostMsg_SelectionBounds_Params& params) {
(...skipping 1574 matching lines...) Expand 10 before | Expand all | Expand 10 after
2499 2497
2500 //////////////////////////////////////////////////////////////////////////////// 2498 ////////////////////////////////////////////////////////////////////////////////
2501 // RenderWidgetHostViewBase, public: 2499 // RenderWidgetHostViewBase, public:
2502 2500
2503 // static 2501 // static
2504 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { 2502 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) {
2505 GetScreenInfoForWindow(results, NULL); 2503 GetScreenInfoForWindow(results, NULL);
2506 } 2504 }
2507 2505
2508 } // namespace content 2506 } // namespace content
OLDNEW
« no previous file with comments | « components/bookmarks/browser/bookmark_utils_unittest.cc ('k') | content/renderer/scoped_clipboard_writer_glue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698