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

Side by Side Diff: chrome/browser/prerender/prerender_contents.cc

Issue 6880073: Plumb direction of document title through IPC layer. (Closed) Base URL: svn://svn.chromium.org/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 "chrome/browser/prerender/prerender_contents.h" 5 #include "chrome/browser/prerender/prerender_contents.h"
6 6
7 #include "base/process_util.h" 7 #include "base/process_util.h"
8 #include "base/task.h" 8 #include "base/task.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/background_contents_service.h" 10 #include "chrome/browser/background_contents_service.h"
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 if (!AddAliasURL(params.url)) { 248 if (!AddAliasURL(params.url)) {
249 Destroy(FINAL_STATUS_HTTPS); 249 Destroy(FINAL_STATUS_HTTPS);
250 return; 250 return;
251 } 251 }
252 252
253 url_ = params.url; 253 url_ = params.url;
254 } 254 }
255 255
256 void PrerenderContents::UpdateTitle(RenderViewHost* render_view_host, 256 void PrerenderContents::UpdateTitle(RenderViewHost* render_view_host,
257 int32 page_id, 257 int32 page_id,
258 const std::wstring& title) { 258 const string16& title,
259 if (title.empty()) { 259 WebKit::WebTextDirection title_direction) {
260 if (title.empty())
260 return; 261 return;
261 }
262 262
263 title_ = WideToUTF16Hack(title); 263 // TODO(evan): use directionality of title.
264 // http://code.google.com/p/chromium/issues/detail?id=27094
265 title_ = title;
264 page_id_ = page_id; 266 page_id_ = page_id;
265 } 267 }
266 268
267 void PrerenderContents::RunJavaScriptMessage( 269 void PrerenderContents::RunJavaScriptMessage(
268 const std::wstring& message, 270 const std::wstring& message,
269 const std::wstring& default_prompt, 271 const std::wstring& default_prompt,
270 const GURL& frame_url, 272 const GURL& frame_url,
271 const int flags, 273 const int flags,
272 IPC::Message* reply_msg, 274 IPC::Message* reply_msg,
273 bool* did_suppress_message) { 275 bool* did_suppress_message) {
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 return; 543 return;
542 544
543 size_t private_bytes, shared_bytes; 545 size_t private_bytes, shared_bytes;
544 if (metrics->GetMemoryBytes(&private_bytes, &shared_bytes)) { 546 if (metrics->GetMemoryBytes(&private_bytes, &shared_bytes)) {
545 if (private_bytes > kMaxPrerenderPrivateMB * 1024 * 1024) 547 if (private_bytes > kMaxPrerenderPrivateMB * 1024 * 1024)
546 Destroy(FINAL_STATUS_MEMORY_LIMIT_EXCEEDED); 548 Destroy(FINAL_STATUS_MEMORY_LIMIT_EXCEEDED);
547 } 549 }
548 } 550 }
549 551
550 } // namespace prerender 552 } // namespace prerender
OLDNEW
« no previous file with comments | « chrome/browser/prerender/prerender_contents.h ('k') | chrome/browser/prerender/prerender_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698