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/webui/options/personal_options_handler.cc

Issue 7748038: Remove BrowserSignin, as it's not used anywhere. (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
« no previous file with comments | « chrome/browser/ui/webui/options/personal_options_handler.h ('k') | chrome/chrome_browser.gypi » ('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) 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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 *visible); 319 *visible);
320 320
321 // Set profile creation text and button if multi-profiles switch is on. 321 // Set profile creation text and button if multi-profiles switch is on.
322 visible.reset(Value::CreateBooleanValue(multiprofile_)); 322 visible.reset(Value::CreateBooleanValue(multiprofile_));
323 web_ui_->CallJavascriptFunction("PersonalOptions.setProfilesSectionVisible", 323 web_ui_->CallJavascriptFunction("PersonalOptions.setProfilesSectionVisible",
324 *visible); 324 *visible);
325 if (multiprofile_) 325 if (multiprofile_)
326 SendProfilesInfo(); 326 SendProfilesInfo();
327 } 327 }
328 328
329 void PersonalOptionsHandler::OnLoginSuccess() {
330 OnStateChanged();
331 }
332
333 void PersonalOptionsHandler::OnLoginFailure(
334 const GoogleServiceAuthError& error) {
335 OnStateChanged();
336 }
337
338 void PersonalOptionsHandler::ObserveThemeChanged() { 329 void PersonalOptionsHandler::ObserveThemeChanged() {
339 Profile* profile = Profile::FromWebUI(web_ui_); 330 Profile* profile = Profile::FromWebUI(web_ui_);
340 #if defined(TOOLKIT_GTK) 331 #if defined(TOOLKIT_GTK)
341 GtkThemeService* theme_service = GtkThemeService::GetFrom(profile); 332 GtkThemeService* theme_service = GtkThemeService::GetFrom(profile);
342 bool is_gtk_theme = theme_service->UsingNativeTheme(); 333 bool is_gtk_theme = theme_service->UsingNativeTheme();
343 base::FundamentalValue gtk_enabled(!is_gtk_theme); 334 base::FundamentalValue gtk_enabled(!is_gtk_theme);
344 web_ui_->CallJavascriptFunction( 335 web_ui_->CallJavascriptFunction(
345 "options.PersonalOptions.setGtkThemeButtonEnabled", gtk_enabled); 336 "options.PersonalOptions.setGtkThemeButtonEnabled", gtk_enabled);
346 #else 337 #else
347 ThemeService* theme_service = ThemeServiceFactory::GetForProfile(profile); 338 ThemeService* theme_service = ThemeServiceFactory::GetForProfile(profile);
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 } 425 }
435 426
436 web_ui_->CallJavascriptFunction("PersonalOptions.setProfilesInfo", 427 web_ui_->CallJavascriptFunction("PersonalOptions.setProfilesInfo",
437 profile_info_list); 428 profile_info_list);
438 } 429 }
439 430
440 void PersonalOptionsHandler::CreateProfile(const ListValue* args) { 431 void PersonalOptionsHandler::CreateProfile(const ListValue* args) {
441 ProfileManager::CreateMultiProfileAsync(); 432 ProfileManager::CreateMultiProfileAsync();
442 } 433 }
443 434
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/personal_options_handler.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698