Home | History | Annotate | Download | only in chromeos
      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
      3 // found in the LICENSE file.
      4 
      5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_ACCOUNTS_OPTIONS_HANDLER_H_
      6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_ACCOUNTS_OPTIONS_HANDLER_H_
      7 #pragma once
      8 
      9 #include "chrome/browser/ui/webui/options/chromeos/cros_options_page_ui_handler.h"
     10 
     11 class OptionsManagedBannerHandler;
     12 
     13 namespace chromeos {
     14 
     15 class UserCrosSettingsProvider;
     16 
     17 // ChromeOS accounts options page handler.
     18 class AccountsOptionsHandler : public CrosOptionsPageUIHandler {
     19  public:
     20   AccountsOptionsHandler();
     21   virtual ~AccountsOptionsHandler();
     22 
     23   // WebUIMessageHandler implementation.
     24   virtual void RegisterMessages();
     25 
     26   // OptionsPageUIHandler implementation.
     27   virtual void GetLocalizedValues(DictionaryValue* localized_strings);
     28   virtual void Initialize();
     29 
     30  private:
     31   UserCrosSettingsProvider* users_settings() const;
     32 
     33   // Javascript callbacks to whitelist/unwhitelist user.
     34   void WhitelistUser(const ListValue* args);
     35   void UnwhitelistUser(const ListValue* args);
     36 
     37   // Javascript callback to fetch known user pictures.
     38   void FetchUserPictures(const ListValue* args);
     39 
     40   // Javascript callback to auto add existing users to white list.
     41   void WhitelistExistingUsers(const ListValue* args);
     42 
     43   scoped_ptr<OptionsManagedBannerHandler> banner_handler_;
     44 
     45   DISALLOW_COPY_AND_ASSIGN(AccountsOptionsHandler);
     46 };
     47 
     48 }  // namespace chromeos
     49 
     50 #endif  // CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_ACCOUNTS_OPTIONS_HANDLER_H_
     51