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

Side by Side Diff: chrome/renderer/render_view.cc

Issue 192017: Convert std::wstring encoding names to std::string in a bunch of files. (Closed)
Patch Set: mac and linux fixes Created 11 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
« no previous file with comments | « chrome/renderer/render_view.h ('k') | chrome/test/automated_ui_tests/automated_ui_tests.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 (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/renderer/render_view.h" 5 #include "chrome/renderer/render_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 983 matching lines...) Expand 10 before | Expand all | Expand 10 after
994 if (webview()->GetMainFrame() == frame) { 994 if (webview()->GetMainFrame() == frame) {
995 Send(new ViewHostMsg_UpdateTitle( 995 Send(new ViewHostMsg_UpdateTitle(
996 routing_id_, 996 routing_id_,
997 page_id_, 997 page_id_,
998 title.length() > chrome::kMaxTitleChars ? 998 title.length() > chrome::kMaxTitleChars ?
999 title.substr(0, chrome::kMaxTitleChars) : title)); 999 title.substr(0, chrome::kMaxTitleChars) : title));
1000 } 1000 }
1001 } 1001 }
1002 1002
1003 void RenderView::UpdateEncoding(WebFrame* frame, 1003 void RenderView::UpdateEncoding(WebFrame* frame,
1004 const std::wstring& encoding_name) { 1004 const std::string& encoding_name) {
1005 // Only update main frame's encoding_name. 1005 // Only update main frame's encoding_name.
1006 if (webview()->GetMainFrame() == frame && 1006 if (webview()->GetMainFrame() == frame &&
1007 last_encoding_name_ != encoding_name) { 1007 last_encoding_name_ != encoding_name) {
1008 // Save the encoding name for later comparing. 1008 // Save the encoding name for later comparing.
1009 last_encoding_name_ = encoding_name; 1009 last_encoding_name_ = encoding_name;
1010 1010
1011 Send(new ViewHostMsg_UpdateEncoding(routing_id_, last_encoding_name_)); 1011 Send(new ViewHostMsg_UpdateEncoding(routing_id_, last_encoding_name_));
1012 } 1012 }
1013 } 1013 }
1014 1014
(...skipping 1553 matching lines...) Expand 10 before | Expand all | Expand 10 after
2568 } 2568 }
2569 } 2569 }
2570 2570
2571 void RenderView::OnInsertText(const string16& text) { 2571 void RenderView::OnInsertText(const string16& text) {
2572 WebFrame* frame = webview()->GetFocusedFrame(); 2572 WebFrame* frame = webview()->GetFocusedFrame();
2573 if (!frame) 2573 if (!frame)
2574 return; 2574 return;
2575 frame->insertText(text); 2575 frame->insertText(text);
2576 } 2576 }
2577 2577
2578 void RenderView::OnSetPageEncoding(const std::wstring& encoding_name) { 2578 void RenderView::OnSetPageEncoding(const std::string& encoding_name) {
2579 webview()->SetPageEncoding(encoding_name); 2579 webview()->SetPageEncoding(encoding_name);
2580 } 2580 }
2581 2581
2582 void RenderView::NavigateBackForwardSoon(int offset) { 2582 void RenderView::NavigateBackForwardSoon(int offset) {
2583 history_back_list_count_ += offset; 2583 history_back_list_count_ += offset;
2584 history_forward_list_count_ -= offset; 2584 history_forward_list_count_ -= offset;
2585 2585
2586 Send(new ViewHostMsg_GoToEntryAtOffset(routing_id_, offset)); 2586 Send(new ViewHostMsg_GoToEntryAtOffset(routing_id_, offset));
2587 } 2587 }
2588 2588
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after
3389 Send(new ViewHostMsg_PasswordFormsSeen(routing_id_, password_forms)); 3389 Send(new ViewHostMsg_PasswordFormsSeen(routing_id_, password_forms));
3390 } 3390 }
3391 3391
3392 void RenderView::Print(WebFrame* frame, bool script_initiated) { 3392 void RenderView::Print(WebFrame* frame, bool script_initiated) {
3393 DCHECK(frame); 3393 DCHECK(frame);
3394 if (print_helper_.get() == NULL) { 3394 if (print_helper_.get() == NULL) {
3395 print_helper_.reset(new PrintWebViewHelper(this)); 3395 print_helper_.reset(new PrintWebViewHelper(this));
3396 } 3396 }
3397 print_helper_->Print(frame, script_initiated); 3397 print_helper_->Print(frame, script_initiated);
3398 } 3398 }
OLDNEW
« no previous file with comments | « chrome/renderer/render_view.h ('k') | chrome/test/automated_ui_tests/automated_ui_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698