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

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

Issue 525016: Update RenderPreferences on GTK change. (Closed)
Patch Set: style nit Created 10 years, 11 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/browser/tab_contents/interstitial_page.cc ('k') | chrome/common/gtk_util.h » ('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/browser/tab_contents/tab_contents.h" 5 #include "chrome/browser/tab_contents/tab_contents.h"
6 6
7 #include "app/gfx/text_elider.h" 7 #include "app/gfx/text_elider.h"
8 #include "app/l10n_util.h" 8 #include "app/l10n_util.h"
9 #include "app/resource_bundle.h" 9 #include "app/resource_bundle.h"
10 #include "base/file_version_info.h" 10 #include "base/file_version_info.h"
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 capturing_contents_(false), 251 capturing_contents_(false),
252 is_being_destroyed_(false), 252 is_being_destroyed_(false),
253 notify_disconnection_(false), 253 notify_disconnection_(false),
254 history_requests_(), 254 history_requests_(),
255 #if defined(OS_WIN) 255 #if defined(OS_WIN)
256 message_box_active_(CreateEvent(NULL, TRUE, FALSE, NULL)), 256 message_box_active_(CreateEvent(NULL, TRUE, FALSE, NULL)),
257 #endif 257 #endif
258 last_javascript_message_dismissal_(), 258 last_javascript_message_dismissal_(),
259 suppress_javascript_messages_(false), 259 suppress_javascript_messages_(false),
260 is_showing_before_unload_dialog_(false), 260 is_showing_before_unload_dialog_(false),
261 renderer_preferences_( 261 renderer_preferences_(),
262 renderer_preferences_util::GetInitedRendererPreferences(profile)),
263 opener_dom_ui_type_(DOMUIFactory::kNoDOMUI) { 262 opener_dom_ui_type_(DOMUIFactory::kNoDOMUI) {
263 renderer_preferences_util::UpdateFromSystemSettings(
264 &renderer_preferences_, profile);
265
264 #if defined(OS_CHROMEOS) 266 #if defined(OS_CHROMEOS)
265 // Make sure the thumbnailer is started before starting the render manager. 267 // Make sure the thumbnailer is started before starting the render manager.
266 // The thumbnailer will want to listen for RVH creations, one of which will 268 // The thumbnailer will want to listen for RVH creations, one of which will
267 // happen in RVHManager::Init. 269 // happen in RVHManager::Init.
268 ThumbnailGenerator* generator = g_browser_process->GetThumbnailGenerator(); 270 ThumbnailGenerator* generator = g_browser_process->GetThumbnailGenerator();
269 if (generator) 271 if (generator)
270 generator->StartThumbnailing(); 272 generator->StartThumbnailing();
271 #endif 273 #endif
272 274
273 render_manager_.Init(profile, site_instance, routing_id); 275 render_manager_.Init(profile, site_instance, routing_id);
(...skipping 2308 matching lines...) Expand 10 before | Expand all | Expand 10 after
2582 DCHECK(&controller_ == Source<NavigationController>(source).ptr()); 2584 DCHECK(&controller_ == Source<NavigationController>(source).ptr());
2583 2585
2584 NavigationController::LoadCommittedDetails& committed_details = 2586 NavigationController::LoadCommittedDetails& committed_details =
2585 *(Details<NavigationController::LoadCommittedDetails>(details).ptr()); 2587 *(Details<NavigationController::LoadCommittedDetails>(details).ptr());
2586 ExpireInfoBars(committed_details); 2588 ExpireInfoBars(committed_details);
2587 break; 2589 break;
2588 } 2590 }
2589 2591
2590 #if defined(OS_LINUX) 2592 #if defined(OS_LINUX)
2591 case NotificationType::BROWSER_THEME_CHANGED: { 2593 case NotificationType::BROWSER_THEME_CHANGED: {
2594 renderer_preferences_util::UpdateFromSystemSettings(
2595 &renderer_preferences_, profile());
2592 render_view_host()->SyncRendererPrefs(); 2596 render_view_host()->SyncRendererPrefs();
2593 break; 2597 break;
2594 } 2598 }
2595 #endif 2599 #endif
2596 2600
2597 default: 2601 default:
2598 NOTREACHED(); 2602 NOTREACHED();
2599 } 2603 }
2600 } 2604 }
2601 2605
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
2647 render_view_host()->JavaScriptMessageBoxClosed(reply_msg, success, prompt); 2651 render_view_host()->JavaScriptMessageBoxClosed(reply_msg, success, prompt);
2648 } 2652 }
2649 2653
2650 void TabContents::SetSuppressMessageBoxes(bool suppress_message_boxes) { 2654 void TabContents::SetSuppressMessageBoxes(bool suppress_message_boxes) {
2651 set_suppress_javascript_messages(suppress_message_boxes); 2655 set_suppress_javascript_messages(suppress_message_boxes);
2652 } 2656 }
2653 2657
2654 void TabContents::set_encoding(const std::string& encoding) { 2658 void TabContents::set_encoding(const std::string& encoding) {
2655 encoding_ = CharacterEncoding::GetCanonicalEncodingNameByAliasName(encoding); 2659 encoding_ = CharacterEncoding::GetCanonicalEncodingNameByAliasName(encoding);
2656 } 2660 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/interstitial_page.cc ('k') | chrome/common/gtk_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698