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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_INTERNET_OPTIONS_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_INTERNET_OPTIONS_HANDLER_H_
10 #include "base/compiler_specific.h"
11 #include "base/memory/weak_ptr.h"
12 #include "chrome/browser/ui/webui/options/options_ui.h"
13 #include "ui/gfx/native_widget_types.h"
29 // ChromeOS internet options page UI handler.
30 class InternetOptionsHandler
: public ::options::OptionsPageUIHandler
{
32 InternetOptionsHandler();
33 ~InternetOptionsHandler() override
;
36 // OptionsPageUIHandler
37 void GetLocalizedValues(base::DictionaryValue
* localized_strings
) override
;
39 // WebUIMessageHandler (from OptionsPageUIHandler)
40 void RegisterMessages() override
;
42 // Callbacks to set network state properties.
43 void ShowMorePlanInfoCallback(const base::ListValue
* args
);
44 void SimOperationCallback(const base::ListValue
* args
);
46 // Gets the native window for hosting dialogs, etc.
47 gfx::NativeWindow
GetNativeWindow() const;
49 // Gets the user PrefService associated with the WebUI.
50 const PrefService
* GetPrefs() const;
52 // Additional callbacks for managing networks.
53 void AddVPNConnection(const base::ListValue
* args
);
54 void AddNonVPNConnection(const base::ListValue
* args
);
55 void ConfigureNetwork(const base::ListValue
* args
);
57 // Weak pointer factory so we can start connections at a later time
58 // without worrying that they will actually try to happen after the lifetime
60 base::WeakPtrFactory
<InternetOptionsHandler
> weak_factory_
;
62 DISALLOW_COPY_AND_ASSIGN(InternetOptionsHandler
);
65 } // namespace options
66 } // namespace chromeos
68 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_INTERNET_OPTIONS_HANDLER_H_