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

Unified Diff: chrome/browser/ui/extensions/app_metro_infobar_delegate_win.h

Issue 12450014: Show an InfoBar when trying to start Packaged Apps from Metro mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: feedback Created 7 years, 9 months 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/extensions/app_metro_infobar_delegate_win.h
diff --git a/chrome/browser/ui/extensions/app_metro_infobar_delegate_win.h b/chrome/browser/ui/extensions/app_metro_infobar_delegate_win.h
index f82a8448983afa6bd5d62e9396e0f6b6300d566b..b56278fc32cc525a3bdf52ac7edf55b0f775447c 100644
--- a/chrome/browser/ui/extensions/app_metro_infobar_delegate_win.h
+++ b/chrome/browser/ui/extensions/app_metro_infobar_delegate_win.h
@@ -23,13 +23,21 @@ namespace chrome {
// in Desktop mode if confirmed.
class AppMetroInfoBarDelegateWin : public ConfirmInfoBarDelegate {
public:
- // Creates an instance of the app metro infobar delegate, adds it to
- // |infobar_service|, and then activates metro mode. This CHECK()s to ensure
- // that it is only called while running in desktop mode.
- static void CreateAndActivateMetro(Profile* profile);
+ enum Mode {
+ SHOW_APP_LIST,
+ LAUNCH_PACKAGED_APP
+ };
+
+ // Creates an instance of the app metro infobar delegate, adds it to a new
+ // browser tab, then activates Metro mode.
+ static void Create(Profile* profile,
+ Mode mode,
+ const std::string& extension_id);
private:
- explicit AppMetroInfoBarDelegateWin(InfoBarService* infobar_service);
+ explicit AppMetroInfoBarDelegateWin(InfoBarService* infobar_service,
+ Mode mode,
+ const std::string& extension_id);
virtual ~AppMetroInfoBarDelegateWin();
// ConfirmInfoBarDelegate overrides:
@@ -42,9 +50,12 @@ class AppMetroInfoBarDelegateWin : public ConfirmInfoBarDelegate {
virtual string16 GetLinkText() const OVERRIDE;
virtual bool LinkClicked(WindowOpenDisposition disposition) OVERRIDE;
+ Mode mode_;
+ std::string extension_id_;
+
DISALLOW_COPY_AND_ASSIGN(AppMetroInfoBarDelegateWin);
};
-#endif // CHROME_BROWSER_UI_EXTENSIONS_APP_METRO_INFOBAR_DELEGATE_WIN_H_
-
} // namespace chrome
+
+#endif // CHROME_BROWSER_UI_EXTENSIONS_APP_METRO_INFOBAR_DELEGATE_WIN_H_
« no previous file with comments | « chrome/browser/extensions/platform_app_launcher.cc ('k') | chrome/browser/ui/extensions/app_metro_infobar_delegate_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698