diff options
author | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-21 16:53:46 +0000 |
---|---|---|
committer | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-21 16:53:46 +0000 |
commit | 840b151b7ba47a37b10f45983d055924b1acef25 (patch) | |
tree | 346bce4b08e2605dc5b81e1c2f94e4deb3da0759 /chrome/browser/browser.cc | |
parent | 8e95888b55b2a2668cd015367605842984fee25c (diff) | |
download | chromium_src-840b151b7ba47a37b10f45983d055924b1acef25.zip chromium_src-840b151b7ba47a37b10f45983d055924b1acef25.tar.gz chromium_src-840b151b7ba47a37b10f45983d055924b1acef25.tar.bz2 |
Linux: pass users' font settings through to renderer.
The renderer doesn't give the settings to Skia yet -- that'll
go in after agl's work on hinting and subpixel rendering in Skia.
http://codereview.chromium.org/155787
(Patch by Dan Erat)
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21182 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser.cc')
-rw-r--r-- | chrome/browser/browser.cc | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc index e1f5ff4..533be3f 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(); } /////////////////////////////////////////////////////////////////////////////// @@ -1898,8 +1898,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(); } |