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

Side by Side Diff: chrome/browser/ui/webui/options/chromeos/internet_options_handler.h

Issue 2426473009: mash: Place views Wi-Fi network config dialogs in correct window parent (Closed)
Patch Set: rebase Created 4 years, 2 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
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 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_INTERNET_OPTIONS_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_INTERNET_OPTIONS_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_INTERNET_OPTIONS_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_INTERNET_OPTIONS_HANDLER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "chrome/browser/ui/webui/options/options_ui.h" 13 #include "chrome/browser/ui/webui/options/options_ui.h"
14 #include "ui/gfx/native_widget_types.h" 14 #include "ui/gfx/native_widget_types.h"
15 15
16 class Browser; 16 class Browser;
17 class PrefService; 17 class PrefService;
18 18
19 namespace gfx { 19 namespace gfx {
20 class ImageSkia; 20 class ImageSkia;
21 } 21 }
22 22
23 namespace views { 23 namespace views {
24 class WidgetDelegate; 24 class WidgetDelegate;
25 struct WidgetParent;
25 } 26 }
26 27
27 namespace chromeos { 28 namespace chromeos {
28 namespace options { 29 namespace options {
29 30
30 // ChromeOS internet options page UI handler. 31 // ChromeOS internet options page UI handler.
31 class InternetOptionsHandler : public ::options::OptionsPageUIHandler { 32 class InternetOptionsHandler : public ::options::OptionsPageUIHandler {
32 public: 33 public:
33 InternetOptionsHandler(); 34 InternetOptionsHandler();
34 ~InternetOptionsHandler() override; 35 ~InternetOptionsHandler() override;
35 36
36 private: 37 private:
37 // OptionsPageUIHandler 38 // OptionsPageUIHandler
38 void GetLocalizedValues(base::DictionaryValue* localized_strings) override; 39 void GetLocalizedValues(base::DictionaryValue* localized_strings) override;
39 40
40 // WebUIMessageHandler (from OptionsPageUIHandler) 41 // WebUIMessageHandler (from OptionsPageUIHandler)
41 void RegisterMessages() override; 42 void RegisterMessages() override;
42 43
43 // Callbacks to set network state properties. 44 // Callbacks to set network state properties.
44 void ShowMorePlanInfoCallback(const base::ListValue* args); 45 void ShowMorePlanInfoCallback(const base::ListValue* args);
45 void SimOperationCallback(const base::ListValue* args); 46 void SimOperationCallback(const base::ListValue* args);
46 47
47 // Gets the native window for hosting dialogs, etc. 48 // Deprecated: Use GetWidgetParent() instead.
48 gfx::NativeWindow GetNativeWindow() const; 49 gfx::NativeWindow GetNativeWindow() const;
49 50
51 // Returns a parent for hosting dialogs.
52 views::WidgetParent GetWidgetParent() const;
53
50 // Gets the user PrefService associated with the WebUI. 54 // Gets the user PrefService associated with the WebUI.
51 const PrefService* GetPrefs() const; 55 const PrefService* GetPrefs() const;
52 56
53 // Additional callbacks for managing networks. 57 // Additional callbacks for managing networks.
54 void AddVPNConnection(const base::ListValue* args); 58 void AddVPNConnection(const base::ListValue* args);
55 void AddNonVPNConnection(const base::ListValue* args); 59 void AddNonVPNConnection(const base::ListValue* args);
56 void ConfigureNetwork(const base::ListValue* args); 60 void ConfigureNetwork(const base::ListValue* args);
57 61
58 // Weak pointer factory so we can start connections at a later time 62 // Weak pointer factory so we can start connections at a later time
59 // without worrying that they will actually try to happen after the lifetime 63 // without worrying that they will actually try to happen after the lifetime
60 // of this object. 64 // of this object.
61 base::WeakPtrFactory<InternetOptionsHandler> weak_factory_; 65 base::WeakPtrFactory<InternetOptionsHandler> weak_factory_;
62 66
63 DISALLOW_COPY_AND_ASSIGN(InternetOptionsHandler); 67 DISALLOW_COPY_AND_ASSIGN(InternetOptionsHandler);
64 }; 68 };
65 69
66 } // namespace options 70 } // namespace options
67 } // namespace chromeos 71 } // namespace chromeos
68 72
69 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_INTERNET_OPTIONS_HANDLER_H_ 73 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_INTERNET_OPTIONS_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698