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

Side by Side Diff: content/browser/tab_contents/tab_contents.cc

Issue 6898026: Eliminate wstring from base/utf_offset_string_conversions.h, net/base/escape.h, and net/base/net_... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/tab_contents/tab_contents.h" 5 #include "content/browser/tab_contents/tab_contents.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 2185 matching lines...) Expand 10 before | Expand all | Expand 10 after
2196 browser::HideHungRendererDialog(this); 2196 browser::HideHungRendererDialog(this);
2197 } 2197 }
2198 2198
2199 void TabContents::LoadStateChanged(const GURL& url, 2199 void TabContents::LoadStateChanged(const GURL& url,
2200 net::LoadState load_state, 2200 net::LoadState load_state,
2201 uint64 upload_position, 2201 uint64 upload_position,
2202 uint64 upload_size) { 2202 uint64 upload_size) {
2203 load_state_ = load_state; 2203 load_state_ = load_state;
2204 upload_position_ = upload_position; 2204 upload_position_ = upload_position;
2205 upload_size_ = upload_size; 2205 upload_size_ = upload_size;
2206 std::wstring languages = 2206 load_state_host_ = net::IDNToUnicode(url.host(),
2207 UTF8ToWide(profile()->GetPrefs()->GetString(prefs::kAcceptLanguages)); 2207 profile()->GetPrefs()->GetString(prefs::kAcceptLanguages));
2208 std::string host = url.host();
2209 load_state_host_ = WideToUTF16Hack(
2210 net::IDNToUnicode(host.c_str(), host.size(), languages, NULL));
2211 if (load_state_ == net::LOAD_STATE_READING_RESPONSE) 2208 if (load_state_ == net::LOAD_STATE_READING_RESPONSE)
2212 SetNotWaitingForResponse(); 2209 SetNotWaitingForResponse();
2213 if (is_loading()) 2210 if (is_loading())
2214 NotifyNavigationStateChanged(INVALIDATE_LOAD | INVALIDATE_TAB); 2211 NotifyNavigationStateChanged(INVALIDATE_LOAD | INVALIDATE_TAB);
2215 } 2212 }
2216 2213
2217 bool TabContents::IsExternalTabContainer() const { 2214 bool TabContents::IsExternalTabContainer() const {
2218 if (!delegate()) 2215 if (!delegate())
2219 return false; 2216 return false;
2220 2217
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
2437 2434
2438 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { 2435 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) {
2439 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); 2436 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh);
2440 rwh_view->SetSize(view()->GetContainerSize()); 2437 rwh_view->SetSize(view()->GetContainerSize());
2441 } 2438 }
2442 2439
2443 void TabContents::OnOnlineStateChanged(bool online) { 2440 void TabContents::OnOnlineStateChanged(bool online) {
2444 render_view_host()->Send(new ViewMsg_NetworkStateChanged( 2441 render_view_host()->Send(new ViewMsg_NetworkStateChanged(
2445 render_view_host()->routing_id(), online)); 2442 render_view_host()->routing_id(), online));
2446 } 2443 }
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension.cc ('k') | net/base/escape.h » ('j') | net/base/net_util.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698