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

Unified Diff: chrome/browser/browser.cc

Issue 155787: Make Linux pass users' font settings through to renderer. (Closed)
Patch Set: remove unneeded include Created 11 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/renderer_host/render_view_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser.cc
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc
index 252ed9fd1be8c17300722fce1ff3a8fa6fbe87e4..409969de4557158de3e4a43e477420d376adffd3 100644
--- a/chrome/browser/browser.cc
+++ b/chrome/browser/browser.cc
@@ -202,8 +202,6 @@ Browser::Browser(Type type, Profile* profile)
// Trim browser memory on idle for low & medium memory models.
if (g_browser_process->memory_model() < BrowserProcess::HIGH_MEMORY_MODEL)
idle_task_->Start();
-
- renderer_preferences_.can_accept_load_drops = (this->type() == TYPE_NORMAL);
}
Browser::~Browser() {
@@ -348,12 +346,14 @@ void Browser::OpenApplicationWindow(Profile* profile, const GURL& url) {
Browser* browser = Browser::CreateForApp(app_name, profile, false);
browser->AddTabWithURL(url, GURL(), PageTransition::START_PAGE, true, -1,
false, NULL);
- browser->GetSelectedTabContents()->render_view_host()->SetRendererPrefs(
- browser->GetSelectedTabContents()->delegate()->GetRendererPrefs());
+
+ TabContents* tab_contents = browser->GetSelectedTabContents();
+ tab_contents->GetMutableRendererPrefs()->can_accept_load_drops = false;
+ tab_contents->render_view_host()->SyncRendererPrefs();
browser->window()->Show();
// TODO(jcampan): http://crbug.com/8123 we should not need to set the initial
// focus explicitly.
- browser->GetSelectedTabContents()->view()->SetInitialFocus();
+ tab_contents->view()->SetInitialFocus();
}
///////////////////////////////////////////////////////////////////////////////
@@ -1897,8 +1897,9 @@ void Browser::ConvertContentsToApplication(TabContents* contents) {
DetachContents(contents);
Browser* browser = Browser::CreateForApp(app_name, profile_, false);
browser->tabstrip_model()->AppendTabContents(contents, true);
- browser->GetSelectedTabContents()->render_view_host()->SetRendererPrefs(
- browser->GetSelectedTabContents()->delegate()->GetRendererPrefs());
+ TabContents* tab_contents = browser->GetSelectedTabContents();
+ tab_contents->GetMutableRendererPrefs()->can_accept_load_drops = false;
+ tab_contents->render_view_host()->SyncRendererPrefs();
browser->window()->Show();
}
« no previous file with comments | « no previous file | chrome/browser/renderer_host/render_view_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698