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

Unified Diff: chrome/browser/ui/cocoa/extensions/windowed_install_dialog_controller.h

Issue 65043015: [mac] Implement a windowed extension install/permissions prompt. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: include -> import and other nits 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/ui/cocoa/extensions/windowed_install_dialog_controller.h
diff --git a/chrome/browser/ui/cocoa/extensions/windowed_install_dialog_controller.h b/chrome/browser/ui/cocoa/extensions/windowed_install_dialog_controller.h
new file mode 100644
index 0000000000000000000000000000000000000000..692502422bd69d559ec7c5cc3e6cfafef320ca03
--- /dev/null
+++ b/chrome/browser/ui/cocoa/extensions/windowed_install_dialog_controller.h
@@ -0,0 +1,49 @@
+// Copyright 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_UI_COCOA_EXTENSIONS_WINDOWED_INSTALL_DIALOG_CONTROLLER_H_
+#define CHROME_BROWSER_UI_COCOA_EXTENSIONS_WINDOWED_INSTALL_DIALOG_CONTROLLER_H_
+
+#import <Cocoa/Cocoa.h>
+
+#include "base/gtest_prod_util.h"
+#include "base/mac/scoped_nsobject.h"
+#include "chrome/browser/extensions/extension_install_prompt.h"
+
+@class ExtensionInstallViewController;
+@class WindowedInstallController;
+
+// Displays an app or extension install or permissions prompt as a standalone
+// NSPanel.
+class WindowedInstallDialogController
+ : public ExtensionInstallPrompt::Delegate {
+ public:
+ // Initializes the ExtensionInstallViewController and shows the window. This
+ // object will delete itself when the window is closed.
+ WindowedInstallDialogController(
+ const ExtensionInstallPrompt::ShowParams& show_params,
+ ExtensionInstallPrompt::Delegate* delegate,
+ const ExtensionInstallPrompt::Prompt& prompt);
+ virtual ~WindowedInstallDialogController();
+
+ // Invoked by the -[NSwindow windowWillClose:] notification after a dialog
Robert Sesek 2013/12/03 14:47:53 nit: NSw -> NSW
tapted 2013/12/03 23:11:47 Done.
+ // choice is invoked. Releases owned resources, then deletes |this|.
+ void OnWindowClosing();
+
+ // ExtensionInstallPrompt::Delegate:
+ virtual void InstallUIProceed() OVERRIDE;
+ virtual void InstallUIAbort(bool user_initiated) OVERRIDE;
+
+ private:
+ FRIEND_TEST_ALL_PREFIXES(WindowedInstallDialogControllerBrowserTest,
+ ShowInstallDialog);
+ ExtensionInstallViewController* GetViewController();
+
+ ExtensionInstallPrompt::Delegate* delegate_;
+ base::scoped_nsobject<WindowedInstallController> install_controller_;
+
+ DISALLOW_COPY_AND_ASSIGN(WindowedInstallDialogController);
+};
+
+#endif // CHROME_BROWSER_UI_COCOA_EXTENSIONS_WINDOWED_INSTALL_DIALOG_CONTROLLER_H_

Powered by Google App Engine
This is Rietveld 408576698