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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/charger_replace/charger_replacement_dialog.h
===================================================================
--- chrome/browser/chromeos/charger_replace/charger_replacement_dialog.h (revision 0)
+++ chrome/browser/chromeos/charger_replace/charger_replacement_dialog.h (revision 0)
@@ -0,0 +1,57 @@
+// 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_CHARGER_REPLACE_CHARGER_REPLACEMENT_DIALOG_H_
+#define CHROME_BROWSER_CHROMEOS_CHARGER_REPLACE_CHARGER_REPLACEMENT_DIALOG_H_
+
+#include "ui/gfx/native_widget_types.h"
+#include "ui/web_dialogs/web_dialog_delegate.h"
+
+namespace chromeos {
+
+class ChargerReplacementHandler;
+
+// Spring charger replacement dialog.
+class ChargerReplacementDialog : public ui::WebDialogDelegate {
+ public:
+ 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; }
+
+ private:
+ // ui::WebDialogDelegate implementation.
+ virtual ui::ModalType GetDialogModalType() 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(
+ content::WebContents* source, bool* out_close_dialog) OVERRIDE;
+ virtual bool ShouldShowDialogTitle() const OVERRIDE;
+ virtual bool HandleContextMenu(
+ const content::ContextMenuParams& params) OVERRIDE;
+
+ static bool is_window_visible_;
+
+ gfx::NativeWindow parent_window_;
+ bool can_close_;
+ ChargerReplacementHandler* charger_replacement_handler_;
+
+ DISALLOW_COPY_AND_ASSIGN(ChargerReplacementDialog);
+};
+
+} // namespace chromeos
+
+#endif // CHROME_BROWSER_CHROMEOS_CHARGER_REPLACE_CHARGER_REPLACEMENT_DIALOG_H_
Property changes on: chrome/browser/chromeos/charger_replace/charger_replacement_dialog.h
___________________________________________________________________
Added: svn:eol-style
+ LF

Powered by Google App Engine
This is Rietveld 408576698