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

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 183853011: Move TrimWhitespace to the base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | « content/renderer/p2p/port_allocator.cc ('k') | extensions/common/feature_switch.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/renderer/render_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after
799 bool RenderFrameImpl::ShouldUpdateSelectionTextFromContextMenuParams( 799 bool RenderFrameImpl::ShouldUpdateSelectionTextFromContextMenuParams(
800 const base::string16& selection_text, 800 const base::string16& selection_text,
801 size_t selection_text_offset, 801 size_t selection_text_offset,
802 const gfx::Range& selection_range, 802 const gfx::Range& selection_range,
803 const ContextMenuParams& params) { 803 const ContextMenuParams& params) {
804 base::string16 trimmed_selection_text; 804 base::string16 trimmed_selection_text;
805 if (!selection_text.empty() && !selection_range.is_empty()) { 805 if (!selection_text.empty() && !selection_range.is_empty()) {
806 const int start = selection_range.GetMin() - selection_text_offset; 806 const int start = selection_range.GetMin() - selection_text_offset;
807 const size_t length = selection_range.length(); 807 const size_t length = selection_range.length();
808 if (start >= 0 && start + length <= selection_text.length()) { 808 if (start >= 0 && start + length <= selection_text.length()) {
809 TrimWhitespace(selection_text.substr(start, length), TRIM_ALL, 809 base::TrimWhitespace(selection_text.substr(start, length), base::TRIM_ALL,
810 &trimmed_selection_text); 810 &trimmed_selection_text);
811 } 811 }
812 } 812 }
813 base::string16 trimmed_params_text; 813 base::string16 trimmed_params_text;
814 TrimWhitespace(params.selection_text, TRIM_ALL, &trimmed_params_text); 814 base::TrimWhitespace(params.selection_text, base::TRIM_ALL,
815 &trimmed_params_text);
815 return trimmed_params_text != trimmed_selection_text; 816 return trimmed_params_text != trimmed_selection_text;
816 } 817 }
817 818
818 void RenderFrameImpl::DidCommitCompositorFrame() { 819 void RenderFrameImpl::DidCommitCompositorFrame() {
819 if (compositing_helper_) 820 if (compositing_helper_)
820 compositing_helper_->DidCommitCompositorFrame(); 821 compositing_helper_->DidCommitCompositorFrame();
821 } 822 }
822 823
823 RenderView* RenderFrameImpl::GetRenderView() { 824 RenderView* RenderFrameImpl::GetRenderView() {
824 return render_view_.get(); 825 return render_view_.get();
(...skipping 1450 matching lines...) Expand 10 before | Expand all | Expand 10 after
2275 2276
2276 void RenderFrameImpl::didStartLoading() { 2277 void RenderFrameImpl::didStartLoading() {
2277 Send(new FrameHostMsg_DidStartLoading(routing_id_)); 2278 Send(new FrameHostMsg_DidStartLoading(routing_id_));
2278 } 2279 }
2279 2280
2280 void RenderFrameImpl::didStopLoading() { 2281 void RenderFrameImpl::didStopLoading() {
2281 Send(new FrameHostMsg_DidStopLoading(routing_id_)); 2282 Send(new FrameHostMsg_DidStopLoading(routing_id_));
2282 } 2283 }
2283 2284
2284 } // namespace content 2285 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/p2p/port_allocator.cc ('k') | extensions/common/feature_switch.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698