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

Side by Side Diff: chrome/browser/chromeos/options/wifi_config_view.h

Issue 6628037: views: Moves TextfieldController/TextRange into their own headers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 9 years, 9 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) 2010 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 #ifndef CHROME_BROWSER_CHROMEOS_OPTIONS_WIFI_CONFIG_VIEW_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_OPTIONS_WIFI_CONFIG_VIEW_H_
6 #define CHROME_BROWSER_CHROMEOS_OPTIONS_WIFI_CONFIG_VIEW_H_ 6 #define CHROME_BROWSER_CHROMEOS_OPTIONS_WIFI_CONFIG_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/gtest_prod_util.h" 11 #include "base/gtest_prod_util.h"
12 #include "base/string16.h" 12 #include "base/string16.h"
13 #include "chrome/browser/chromeos/cros/network_library.h" 13 #include "chrome/browser/chromeos/cros/network_library.h"
14 #include "chrome/browser/ui/shell_dialogs.h" 14 #include "chrome/browser/ui/shell_dialogs.h"
15 #include "ui/base/models/combobox_model.h" 15 #include "ui/base/models/combobox_model.h"
16 #include "views/controls/button/button.h" 16 #include "views/controls/button/button.h"
17 #include "views/controls/button/checkbox.h" 17 #include "views/controls/button/checkbox.h"
18 #include "views/controls/button/image_button.h" 18 #include "views/controls/button/image_button.h"
19 #include "views/controls/button/native_button.h" 19 #include "views/controls/button/native_button.h"
20 #include "views/controls/combobox/combobox.h" 20 #include "views/controls/combobox/combobox.h"
21 #include "views/controls/textfield/textfield.h" 21 #include "views/controls/textfield/textfield_controller.h"
22 #include "views/view.h" 22 #include "views/view.h"
23 23
24 class FilePath; 24 class FilePath;
25 25
26 namespace chromeos { 26 namespace chromeos {
27 27
28 class NetworkConfigView; 28 class NetworkConfigView;
29 29
30 // A dialog box for showing a password textfield. 30 // A dialog box for showing a password textfield.
31 class WifiConfigView : public views::View, 31 class WifiConfigView : public views::View,
32 public views::Textfield::Controller, 32 public views::TextfieldController,
33 public views::ButtonListener, 33 public views::ButtonListener,
34 public views::Combobox::Listener, 34 public views::Combobox::Listener,
35 public SelectFileDialog::Listener { 35 public SelectFileDialog::Listener {
36 public: 36 public:
37 // Wifi login dialog for wifi network |wifi| 37 // Wifi login dialog for wifi network |wifi|
38 WifiConfigView(NetworkConfigView* parent, WifiNetwork* wifi); 38 WifiConfigView(NetworkConfigView* parent, WifiNetwork* wifi);
39 // Wifi login dialog for "Joining other network..." 39 // Wifi login dialog for "Joining other network..."
40 explicit WifiConfigView(NetworkConfigView* parent); 40 explicit WifiConfigView(NetworkConfigView* parent);
41 virtual ~WifiConfigView(); 41 virtual ~WifiConfigView();
42 42
43 // views::Textfield::Controller methods. 43 // views::TextfieldController:
44 virtual void ContentsChanged(views::Textfield* sender, 44 virtual void ContentsChanged(views::Textfield* sender,
45 const string16& new_contents); 45 const string16& new_contents);
46 virtual bool HandleKeyEvent(views::Textfield* sender, 46 virtual bool HandleKeyEvent(views::Textfield* sender,
47 const views::KeyEvent& key_event); 47 const views::KeyEvent& key_event);
48 48
49 // views::ButtonListener 49 // views::ButtonListener:
50 virtual void ButtonPressed(views::Button* sender, const views::Event& event); 50 virtual void ButtonPressed(views::Button* sender, const views::Event& event);
51 51
52 // views::Combobox::Listener 52 // views::Combobox::Listener:
53 virtual void ItemChanged(views::Combobox* combo_box, 53 virtual void ItemChanged(views::Combobox* combo_box,
54 int prev_index, int new_index); 54 int prev_index, int new_index);
55 55
56 // SelectFileDialog::Listener implementation. 56 // SelectFileDialog::Listener:
57 virtual void FileSelected(const FilePath& path, int index, void* params); 57 virtual void FileSelected(const FilePath& path, int index, void* params);
58 58
59 // Login to network. Returns false if the dialog should remain open. 59 // Login to network. Returns false if the dialog should remain open.
60 virtual bool Login(); 60 virtual bool Login();
61 61
62 // Cancel the dialog. 62 // Cancel the dialog.
63 virtual void Cancel(); 63 virtual void Cancel();
64 64
65 // Get the typed in ssid. 65 // Get the typed in ssid.
66 const std::string GetSSID() const; 66 const std::string GetSSID() const;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 views::Textfield* passphrase_textfield_; 99 views::Textfield* passphrase_textfield_;
100 views::ImageButton* passphrase_visible_button_; 100 views::ImageButton* passphrase_visible_button_;
101 views::Label* error_label_; 101 views::Label* error_label_;
102 102
103 DISALLOW_COPY_AND_ASSIGN(WifiConfigView); 103 DISALLOW_COPY_AND_ASSIGN(WifiConfigView);
104 }; 104 };
105 105
106 } // namespace chromeos 106 } // namespace chromeos
107 107
108 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_WIFI_CONFIG_VIEW_H_ 108 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_WIFI_CONFIG_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/screen_lock_view.cc ('k') | chrome/browser/chromeos/options/wifi_config_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698