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

Side by Side Diff: chrome/browser/chromeos/charger_replace/charger_replacement_dialog.h

Issue 102373006: Merge 240486 "Implement the spring charger replacement UI and ad..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1650/src/
Patch Set: Created 7 years 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
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_CHARGER_REPLACE_CHARGER_REPLACEMENT_DIALOG_H_
6 #define CHROME_BROWSER_CHROMEOS_CHARGER_REPLACE_CHARGER_REPLACEMENT_DIALOG_H_
7
8 #include "ui/gfx/native_widget_types.h"
9 #include "ui/web_dialogs/web_dialog_delegate.h"
10
11 namespace chromeos {
12
13 class ChargerReplacementHandler;
14
15 // Spring charger replacement dialog.
16 class ChargerReplacementDialog : public ui::WebDialogDelegate {
17 public:
18 explicit ChargerReplacementDialog(gfx::NativeWindow parent_window);
19 virtual ~ChargerReplacementDialog();
20
21 // True if ChargerReplacementDialog should be shown.
22 static bool ShouldShowDialog();
23
24 void Show();
25 void set_can_close(bool can_close) { can_close_ = can_close; }
26
27 private:
28 // ui::WebDialogDelegate implementation.
29 virtual ui::ModalType GetDialogModalType() const OVERRIDE;
30 virtual string16 GetDialogTitle() const OVERRIDE;
31 virtual GURL GetDialogContentURL() const OVERRIDE;
32 virtual void GetWebUIMessageHandlers(
33 std::vector<content::WebUIMessageHandler*>* handlers) const OVERRIDE;
34 virtual void GetMinimumDialogSize(gfx::Size* size) const OVERRIDE;
35 virtual void GetDialogSize(gfx::Size* size) const OVERRIDE;
36 virtual std::string GetDialogArgs() const OVERRIDE;
37 virtual bool CanCloseDialog() const OVERRIDE;
38 // NOTE: This function deletes this object at the end.
39 virtual void OnDialogClosed(const std::string& json_retval) OVERRIDE;
40 virtual void OnCloseContents(
41 content::WebContents* source, bool* out_close_dialog) OVERRIDE;
42 virtual bool ShouldShowDialogTitle() const OVERRIDE;
43 virtual bool HandleContextMenu(
44 const content::ContextMenuParams& params) OVERRIDE;
45
46 static bool is_window_visible_;
47
48 gfx::NativeWindow parent_window_;
49 bool can_close_;
50 ChargerReplacementHandler* charger_replacement_handler_;
51
52 DISALLOW_COPY_AND_ASSIGN(ChargerReplacementDialog);
53 };
54
55 } // namespace chromeos
56
57 #endif // CHROME_BROWSER_CHROMEOS_CHARGER_REPLACE_CHARGER_REPLACEMENT_DIALOG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698