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

Unified Diff: chrome/browser/extensions/extension_tab_helper.cc

Issue 10700202: Add Android stub implementation for AppNotifyChannelUI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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/extensions/extension_tab_helper.cc
diff --git a/chrome/browser/extensions/extension_tab_helper.cc b/chrome/browser/extensions/extension_tab_helper.cc
index b7519268e65216b7c820e36104b0858960d2f412..9040964c9a9bb2e6135f73192d87d2b246de02ab 100644
--- a/chrome/browser/extensions/extension_tab_helper.cc
+++ b/chrome/browser/extensions/extension_tab_helper.cc
@@ -5,6 +5,9 @@
#include "chrome/browser/extensions/extension_tab_helper.h"
#include "chrome/browser/extensions/crx_installer.h"
+#include "chrome/browser/extensions/app_notify_channel_ui.h"
+#include "chrome/browser/extensions/app_notify_channel_ui_android.h"
+#include "chrome/browser/extensions/app_notify_channel_ui_impl.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/page_action_controller.h"
#include "chrome/browser/extensions/script_badge_controller.h"
@@ -200,7 +203,8 @@ bool ExtensionTabHelper::OnMessageReceived(const IPC::Message& message) {
void ExtensionTabHelper::OnDidGetApplicationInfo(
int32 page_id, const WebApplicationInfo& info) {
-#if !defined(OS_MACOSX)
+ // Android does not implement BrowserWindow.
+#if !defined(OS_MACOSX) && !defined(OS_ANDROID)
web_app_info_ = info;
NavigationEntry* entry =
@@ -269,7 +273,6 @@ void ExtensionTabHelper::OnGetAppNotifyChannel(
const std::string& client_id,
int return_route_id,
int callback_id) {
-
// Check for permission first.
Profile* profile =
Profile::FromBrowserContext(web_contents()->GetBrowserContext());
@@ -299,9 +302,13 @@ void ExtensionTabHelper::OnGetAppNotifyChannel(
return;
}
+#if defined(OS_ANDROID)
+ AppNotifyChannelUI* ui = new AppNotifyChannelUIAndroid();
Jay Civelli 2012/07/13 20:04:14 If you added a static Create() method in AppNotify
nilesh 2012/07/13 21:25:30 Done.
+#else
AppNotifyChannelUI* ui = new AppNotifyChannelUIImpl(
profile, tab_contents(), extension->name(),
AppNotifyChannelUI::NOTIFICATION_INFOBAR);
+#endif
scoped_refptr<AppNotifyChannelSetup> channel_setup(
new AppNotifyChannelSetup(profile,

Powered by Google App Engine
This is Rietveld 408576698