OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_CHARGER_REPLACE_CHARGER_REPLACEMENT_DIALOG_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_CHARGER_REPLACE_CHARGER_REPLACEMENT_DIALOG_H_ |
6 #define CHROME_BROWSER_CHROMEOS_CHARGER_REPLACE_CHARGER_REPLACEMENT_DIALOG_H_ | 6 #define CHROME_BROWSER_CHROMEOS_CHARGER_REPLACE_CHARGER_REPLACEMENT_DIALOG_H_ |
7 | 7 |
8 #include "ui/gfx/native_widget_types.h" | 8 #include "ui/gfx/native_widget_types.h" |
9 #include "ui/web_dialogs/web_dialog_delegate.h" | 9 #include "ui/web_dialogs/web_dialog_delegate.h" |
10 | 10 |
(...skipping 13 matching lines...) Expand all Loading... |
24 // True if ChargerReplacementDialog is visible. | 24 // True if ChargerReplacementDialog is visible. |
25 static bool IsDialogVisible(); | 25 static bool IsDialogVisible(); |
26 | 26 |
27 static void SetFocusOnChargerDialogIfVisible(); | 27 static void SetFocusOnChargerDialogIfVisible(); |
28 | 28 |
29 void Show(); | 29 void Show(); |
30 void set_can_close(bool can_close) { can_close_ = can_close; } | 30 void set_can_close(bool can_close) { can_close_ = can_close; } |
31 | 31 |
32 private: | 32 private: |
33 // ui::WebDialogDelegate implementation. | 33 // ui::WebDialogDelegate implementation. |
34 virtual ui::ModalType GetDialogModalType() const OVERRIDE; | 34 virtual ui::ModalType GetDialogModalType() const override; |
35 virtual base::string16 GetDialogTitle() const OVERRIDE; | 35 virtual base::string16 GetDialogTitle() const override; |
36 virtual GURL GetDialogContentURL() const OVERRIDE; | 36 virtual GURL GetDialogContentURL() const override; |
37 virtual void GetWebUIMessageHandlers( | 37 virtual void GetWebUIMessageHandlers( |
38 std::vector<content::WebUIMessageHandler*>* handlers) const OVERRIDE; | 38 std::vector<content::WebUIMessageHandler*>* handlers) const override; |
39 virtual void GetMinimumDialogSize(gfx::Size* size) const OVERRIDE; | 39 virtual void GetMinimumDialogSize(gfx::Size* size) const override; |
40 virtual void GetDialogSize(gfx::Size* size) const OVERRIDE; | 40 virtual void GetDialogSize(gfx::Size* size) const override; |
41 virtual std::string GetDialogArgs() const OVERRIDE; | 41 virtual std::string GetDialogArgs() const override; |
42 virtual bool CanCloseDialog() const OVERRIDE; | 42 virtual bool CanCloseDialog() const override; |
43 // NOTE: This function deletes this object at the end. | 43 // NOTE: This function deletes this object at the end. |
44 virtual void OnDialogClosed(const std::string& json_retval) OVERRIDE; | 44 virtual void OnDialogClosed(const std::string& json_retval) override; |
45 virtual void OnCloseContents( | 45 virtual void OnCloseContents( |
46 content::WebContents* source, bool* out_close_dialog) OVERRIDE; | 46 content::WebContents* source, bool* out_close_dialog) override; |
47 virtual bool ShouldShowDialogTitle() const OVERRIDE; | 47 virtual bool ShouldShowDialogTitle() const override; |
48 virtual bool HandleContextMenu( | 48 virtual bool HandleContextMenu( |
49 const content::ContextMenuParams& params) OVERRIDE; | 49 const content::ContextMenuParams& params) override; |
50 | 50 |
51 static bool is_window_visible_; | 51 static bool is_window_visible_; |
52 static gfx::NativeWindow current_window_; | 52 static gfx::NativeWindow current_window_; |
53 | 53 |
54 const gfx::NativeWindow parent_window_; | 54 const gfx::NativeWindow parent_window_; |
55 bool can_close_; | 55 bool can_close_; |
56 ChargerReplacementHandler* charger_replacement_handler_; | 56 ChargerReplacementHandler* charger_replacement_handler_; |
57 | 57 |
58 DISALLOW_COPY_AND_ASSIGN(ChargerReplacementDialog); | 58 DISALLOW_COPY_AND_ASSIGN(ChargerReplacementDialog); |
59 }; | 59 }; |
60 | 60 |
61 } // namespace chromeos | 61 } // namespace chromeos |
62 | 62 |
63 #endif // CHROME_BROWSER_CHROMEOS_CHARGER_REPLACE_CHARGER_REPLACEMENT_DIALOG_H_ | 63 #endif // CHROME_BROWSER_CHROMEOS_CHARGER_REPLACE_CHARGER_REPLACEMENT_DIALOG_H_ |
OLD | NEW |