Home | History | Annotate | Download | only in login
      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.
      4 
      5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_PROXY_SETTINGS_DIALOG_H_
      6 #define CHROME_BROWSER_CHROMEOS_LOGIN_PROXY_SETTINGS_DIALOG_H_
      7 
      8 #include "chrome/browser/chromeos/login/login_web_dialog.h"
      9 #include "ui/gfx/native_widget_types.h"
     10 
     11 namespace chromeos {
     12 
     13 class NetworkState;
     14 
     15 // Should be used on the UI thread only, because of static |instance_count_|.
     16 class ProxySettingsDialog : public LoginWebDialog {
     17  public:
     18   // Returns whether the dialog is being shown.
     19   static bool IsShown();
     20 
     21   ProxySettingsDialog(const NetworkState& network,
     22                       LoginWebDialog::Delegate* delegate,
     23                       gfx::NativeWindow window);
     24   virtual ~ProxySettingsDialog();
     25 
     26  protected:
     27   // ui::WebDialogDelegate implementation.
     28   virtual void OnDialogClosed(const std::string& json_retval) OVERRIDE;
     29 
     30  private:
     31   // TODO(altimofeev): consider avoidance static variable by extending current
     32   // WebUI/login interfaces.
     33   static int instance_count_;
     34 
     35   DISALLOW_COPY_AND_ASSIGN(ProxySettingsDialog);
     36 };
     37 
     38 }  // namespace chromeos
     39 
     40 #endif  // CHROME_BROWSER_CHROMEOS_LOGIN_PROXY_SETTINGS_DIALOG_H_
     41