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

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

Issue 9515010: Chrome on Android : Begin removing references to themes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove ntp resource cache into a separate CL and removed SyncPromoUI changes. Created 8 years, 9 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ui/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #endif // OS_WIN 10 #endif // OS_WIN
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UPDATE_DISABLED, 363 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UPDATE_DISABLED,
364 content::Source<Profile>(profile_->GetOriginalProfile())); 364 content::Source<Profile>(profile_->GetOriginalProfile()));
365 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED, 365 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED,
366 content::Source<Profile>(profile_->GetOriginalProfile())); 366 content::Source<Profile>(profile_->GetOriginalProfile()));
367 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED, 367 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
368 content::Source<Profile>(profile_->GetOriginalProfile())); 368 content::Source<Profile>(profile_->GetOriginalProfile()));
369 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNINSTALLED, 369 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNINSTALLED,
370 content::Source<Profile>(profile_->GetOriginalProfile())); 370 content::Source<Profile>(profile_->GetOriginalProfile()));
371 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED, 371 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_PROCESS_TERMINATED,
372 content::NotificationService::AllSources()); 372 content::NotificationService::AllSources());
373 #if !defined(OS_ANDROID)
Elliot Glaysher 2012/03/02 00:23:05 It would really be nice if you had a cleaner way t
Ted C 2012/03/08 19:42:08 I added a TODO of why this particular change will
373 registrar_.Add( 374 registrar_.Add(
374 this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED, 375 this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
375 content::Source<ThemeService>( 376 content::Source<ThemeService>(
376 ThemeServiceFactory::GetForProfile(profile_))); 377 ThemeServiceFactory::GetForProfile(profile_)));
378 #endif
377 registrar_.Add(this, chrome::NOTIFICATION_WEB_CONTENT_SETTINGS_CHANGED, 379 registrar_.Add(this, chrome::NOTIFICATION_WEB_CONTENT_SETTINGS_CHANGED,
378 content::NotificationService::AllSources()); 380 content::NotificationService::AllSources());
379 381
380 PrefService* local_state = g_browser_process->local_state(); 382 PrefService* local_state = g_browser_process->local_state();
381 if (local_state) { 383 if (local_state) {
382 local_pref_registrar_.Init(local_state); 384 local_pref_registrar_.Init(local_state);
383 local_pref_registrar_.Add(prefs::kPrintingEnabled, this); 385 local_pref_registrar_.Add(prefs::kPrintingEnabled, this);
384 local_pref_registrar_.Add(prefs::kAllowFileSelectionDialogs, this); 386 local_pref_registrar_.Add(prefs::kAllowFileSelectionDialogs, this);
385 local_pref_registrar_.Add(prefs::kMetricsReportingEnabled, this); 387 local_pref_registrar_.Add(prefs::kMetricsReportingEnabled, this);
386 } 388 }
(...skipping 4014 matching lines...) Expand 10 before | Expand all | Expand 10 after
4401 case chrome::NOTIFICATION_EXTENSION_UNINSTALLED: 4403 case chrome::NOTIFICATION_EXTENSION_UNINSTALLED:
4402 case chrome::NOTIFICATION_EXTENSION_LOADED: 4404 case chrome::NOTIFICATION_EXTENSION_LOADED:
4403 // During window creation on Windows we may end up calling into 4405 // During window creation on Windows we may end up calling into
4404 // SHAppBarMessage, which internally spawns a nested message loop. This 4406 // SHAppBarMessage, which internally spawns a nested message loop. This
4405 // makes it possible for us to end up here before window creation has 4407 // makes it possible for us to end up here before window creation has
4406 // completed,at which point window_ is NULL. See 94752 for details. 4408 // completed,at which point window_ is NULL. See 94752 for details.
4407 if (window() && window()->GetLocationBar()) 4409 if (window() && window()->GetLocationBar())
4408 window()->GetLocationBar()->UpdatePageActions(); 4410 window()->GetLocationBar()->UpdatePageActions();
4409 break; 4411 break;
4410 4412
4411 case chrome::NOTIFICATION_BROWSER_THEME_CHANGED: 4413 case chrome::NOTIFICATION_BROWSER_THEME_CHANGED:
Elliot Glaysher 2012/03/07 23:52:46 #ifdef this part out too
Ted C 2012/03/08 19:42:08 Done.
4412 window()->UserChangedTheme(); 4414 window()->UserChangedTheme();
4413 break; 4415 break;
4414 4416
4415 case chrome::NOTIFICATION_PREF_CHANGED: { 4417 case chrome::NOTIFICATION_PREF_CHANGED: {
4416 const std::string& pref_name = 4418 const std::string& pref_name =
4417 *content::Details<std::string>(details).ptr(); 4419 *content::Details<std::string>(details).ptr();
4418 if (pref_name == prefs::kPrintingEnabled) { 4420 if (pref_name == prefs::kPrintingEnabled) {
4419 UpdatePrintingState(GetContentRestrictionsForSelectedTab()); 4421 UpdatePrintingState(GetContentRestrictionsForSelectedTab());
4420 } else if (pref_name == prefs::kInstantEnabled || 4422 } else if (pref_name == prefs::kInstantEnabled ||
4421 pref_name == prefs::kMetricsReportingEnabled || 4423 pref_name == prefs::kMetricsReportingEnabled ||
(...skipping 1190 matching lines...) Expand 10 before | Expand all | Expand 10 after
5612 ShowSingletonTabOverwritingNTP(params); 5614 ShowSingletonTabOverwritingNTP(params);
5613 } else { 5615 } else {
5614 LoginUIServiceFactory::GetForProfile( 5616 LoginUIServiceFactory::GetForProfile(
5615 profile()->GetOriginalProfile())->ShowLoginUI(); 5617 profile()->GetOriginalProfile())->ShowLoginUI();
5616 } 5618 }
5617 } 5619 }
5618 5620
5619 void Browser::ToggleSpeechInput() { 5621 void Browser::ToggleSpeechInput() {
5620 GetSelectedWebContents()->GetRenderViewHost()->ToggleSpeechInput(); 5622 GetSelectedWebContents()->GetRenderViewHost()->ToggleSpeechInput();
5621 } 5623 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698