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

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: handle flakiness 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 64451fa6079013191145a94aea3527ad63e47f98..a8101e0cb7d948aec80d7e337445fd1b36c50a4a 100644
--- a/chrome/browser/ui/extensions/app_metro_infobar_delegate_win.h
+++ b/chrome/browser/ui/extensions/app_metro_infobar_delegate_win.h
@@ -26,12 +26,22 @@ class AppMetroInfoBarDelegateWin : public ConfirmInfoBarDelegate {
// 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);
+ static void CreateAndActivateMetroForAppList(Profile* profile);
benwells 2013/03/18 22:16:47 This is a mouthful. Is the CreateAndActivateMetro
tapted 2013/03/19 02:49:05 Most info bars just have a static 'Create()'. This
+ static void CreateAndActivateMetroForApp(Profile* profile,
+ const std::string& extension_id);
- private:
- explicit AppMetroInfoBarDelegateWin(InfoBarService* infobar_service);
virtual ~AppMetroInfoBarDelegateWin();
+ private:
+ enum Mode {
+ SHOW_APP_LIST,
+ LAUNCH_PACKAGED_APP
+ };
+
+ explicit AppMetroInfoBarDelegateWin(InfoBarService* infobar_service,
+ Mode mode,
+ const std::string& extension_id);
+
// ConfirmInfoBarDelegate overrides:
virtual gfx::Image* GetIcon() const OVERRIDE;
virtual string16 GetMessageText() const OVERRIDE;
@@ -42,9 +52,15 @@ class AppMetroInfoBarDelegateWin : public ConfirmInfoBarDelegate {
virtual string16 GetLinkText() const OVERRIDE;
virtual bool LinkClicked(WindowOpenDisposition disposition) OVERRIDE;
+ static void CreateAndActivateMetroHelper(
+ Profile* profile, Mode mode, const std::string& extension_id);
+
+ 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_

Powered by Google App Engine
This is Rietveld 408576698