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

Side by Side Diff: chrome/browser/ui/webui/options/personal_options_handler.cc

Issue 7619006: base: Remove using declaration of FundamentalValue as it's no longer necessary. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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/ui/webui/options/personal_options_handler.h" 5 #include "chrome/browser/ui/webui/options/personal_options_handler.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 void PersonalOptionsHandler::OnLoginFailure( 331 void PersonalOptionsHandler::OnLoginFailure(
332 const GoogleServiceAuthError& error) { 332 const GoogleServiceAuthError& error) {
333 OnStateChanged(); 333 OnStateChanged();
334 } 334 }
335 335
336 void PersonalOptionsHandler::ObserveThemeChanged() { 336 void PersonalOptionsHandler::ObserveThemeChanged() {
337 Profile* profile = web_ui_->GetProfile(); 337 Profile* profile = web_ui_->GetProfile();
338 #if defined(TOOLKIT_GTK) 338 #if defined(TOOLKIT_GTK)
339 GtkThemeService* theme_service = GtkThemeService::GetFrom(profile); 339 GtkThemeService* theme_service = GtkThemeService::GetFrom(profile);
340 bool is_gtk_theme = theme_service->UsingNativeTheme(); 340 bool is_gtk_theme = theme_service->UsingNativeTheme();
341 FundamentalValue gtk_enabled(!is_gtk_theme); 341 base::FundamentalValue gtk_enabled(!is_gtk_theme);
342 web_ui_->CallJavascriptFunction( 342 web_ui_->CallJavascriptFunction(
343 "options.PersonalOptions.setGtkThemeButtonEnabled", gtk_enabled); 343 "options.PersonalOptions.setGtkThemeButtonEnabled", gtk_enabled);
344 #else 344 #else
345 ThemeService* theme_service = ThemeServiceFactory::GetForProfile(profile); 345 ThemeService* theme_service = ThemeServiceFactory::GetForProfile(profile);
346 bool is_gtk_theme = false; 346 bool is_gtk_theme = false;
347 #endif 347 #endif
348 348
349 bool is_classic_theme = !is_gtk_theme && theme_service->UsingDefaultTheme(); 349 bool is_classic_theme = !is_gtk_theme && theme_service->UsingDefaultTheme();
350 FundamentalValue enabled(!is_classic_theme); 350 base::FundamentalValue enabled(!is_classic_theme);
351 web_ui_->CallJavascriptFunction( 351 web_ui_->CallJavascriptFunction(
352 "options.PersonalOptions.setThemesResetButtonEnabled", enabled); 352 "options.PersonalOptions.setThemesResetButtonEnabled", enabled);
353 } 353 }
354 354
355 void PersonalOptionsHandler::Initialize() { 355 void PersonalOptionsHandler::Initialize() {
356 // Listen for theme installation. 356 // Listen for theme installation.
357 registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED, 357 registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
358 Source<ThemeService>(ThemeServiceFactory::GetForProfile( 358 Source<ThemeService>(ThemeServiceFactory::GetForProfile(
359 web_ui_->GetProfile()))); 359 web_ui_->GetProfile())));
360 registrar_.Add(this, chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED, 360 registrar_.Add(this, chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED,
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 } 428 }
429 429
430 web_ui_->CallJavascriptFunction("PersonalOptions.setProfilesInfo", 430 web_ui_->CallJavascriptFunction("PersonalOptions.setProfilesInfo",
431 profile_info_list); 431 profile_info_list);
432 } 432 }
433 433
434 void PersonalOptionsHandler::CreateProfile(const ListValue* args) { 434 void PersonalOptionsHandler::CreateProfile(const ListValue* args) {
435 ProfileManager::CreateMultiProfileAsync(); 435 ProfileManager::CreateMultiProfileAsync();
436 } 436 }
437 437
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/import_data_handler.cc ('k') | chrome/browser/ui/webui/plugins_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698