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); |
+ 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_ |