| Index: chrome/browser/chromeos/charger_replace/charger_replacement_dialog.h
|
| diff --git a/chrome/browser/chromeos/bluetooth/bluetooth_pairing_dialog.h b/chrome/browser/chromeos/charger_replace/charger_replacement_dialog.h
|
| similarity index 51%
|
| copy from chrome/browser/chromeos/bluetooth/bluetooth_pairing_dialog.h
|
| copy to chrome/browser/chromeos/charger_replace/charger_replacement_dialog.h
|
| index 928c2b30f5cb7c0ea3a1dc0ed4a6ba4b84651ec3..5e0ef2b2a78cb4da1804cb4cd85e83f37e849c34 100644
|
| --- a/chrome/browser/chromeos/bluetooth/bluetooth_pairing_dialog.h
|
| +++ b/chrome/browser/chromeos/charger_replace/charger_replacement_dialog.h
|
| @@ -1,41 +1,40 @@
|
| -// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved.
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_PAIRING_DIALOG_H_
|
| -#define CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_PAIRING_DIALOG_H_
|
| +#ifndef CHROME_BROWSER_CHROMEOS_CHARGER_REPLACE_CHARGER_REPLACEMENT_DIALOG_H_
|
| +#define CHROME_BROWSER_CHROMEOS_CHARGER_REPLACE_CHARGER_REPLACEMENT_DIALOG_H_
|
|
|
| -#include <string>
|
| -
|
| -#include "base/compiler_specific.h"
|
| -#include "base/values.h"
|
| #include "ui/gfx/native_widget_types.h"
|
| #include "ui/web_dialogs/web_dialog_delegate.h"
|
|
|
| -namespace device {
|
| -class BluetoothDevice;
|
| -}
|
| -
|
| namespace chromeos {
|
|
|
| -// Bluetooth device pairing dialog shown form ash tray bubble.
|
| -class BluetoothPairingDialog : public ui::WebDialogDelegate {
|
| +class ChargerReplacementHandler;
|
| +
|
| +// Spring charger replacement dialog.
|
| +class ChargerReplacementDialog : public ui::WebDialogDelegate {
|
| public:
|
| - BluetoothPairingDialog(gfx::NativeWindow parent_window,
|
| - const device::BluetoothDevice* device);
|
| - virtual ~BluetoothPairingDialog();
|
| + explicit ChargerReplacementDialog(gfx::NativeWindow parent_window);
|
| + virtual ~ChargerReplacementDialog();
|
| +
|
| + // True if ChargerReplacementDialog should be shown.
|
| + static bool ShouldShowDialog();
|
|
|
| void Show();
|
| + void set_can_close(bool can_close) { can_close_ = can_close; }
|
|
|
| - protected:
|
| + private:
|
| // ui::WebDialogDelegate implementation.
|
| virtual ui::ModalType GetDialogModalType() const OVERRIDE;
|
| - virtual base::string16 GetDialogTitle() const OVERRIDE;
|
| + virtual string16 GetDialogTitle() const OVERRIDE;
|
| virtual GURL GetDialogContentURL() const OVERRIDE;
|
| virtual void GetWebUIMessageHandlers(
|
| std::vector<content::WebUIMessageHandler*>* handlers) const OVERRIDE;
|
| + virtual void GetMinimumDialogSize(gfx::Size* size) const OVERRIDE;
|
| virtual void GetDialogSize(gfx::Size* size) const OVERRIDE;
|
| virtual std::string GetDialogArgs() const OVERRIDE;
|
| + virtual bool CanCloseDialog() const OVERRIDE;
|
| // NOTE: This function deletes this object at the end.
|
| virtual void OnDialogClosed(const std::string& json_retval) OVERRIDE;
|
| virtual void OnCloseContents(
|
| @@ -44,13 +43,15 @@ class BluetoothPairingDialog : public ui::WebDialogDelegate {
|
| virtual bool HandleContextMenu(
|
| const content::ContextMenuParams& params) OVERRIDE;
|
|
|
| - private:
|
| + static bool is_window_visible_;
|
| +
|
| gfx::NativeWindow parent_window_;
|
| - DictionaryValue device_data_;
|
| + bool can_close_;
|
| + ChargerReplacementHandler* charger_replacement_handler_;
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(BluetoothPairingDialog);
|
| + DISALLOW_COPY_AND_ASSIGN(ChargerReplacementDialog);
|
| };
|
|
|
| } // namespace chromeos
|
|
|
| -#endif // CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_PAIRING_DIALOG_H_
|
| +#endif // CHROME_BROWSER_CHROMEOS_CHARGER_REPLACE_CHARGER_REPLACEMENT_DIALOG_H_
|
|
|