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

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

Issue 8194005: Relanding: Add js api for hosted/packaged apps to request notification authorization (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 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.h
diff --git a/chrome/browser/extensions/extension_tab_helper.h b/chrome/browser/extensions/extension_tab_helper.h
index 7dda6fff86430968b62e42191f790c1466eb3782..9e779701dc43fc7d791203d360d11e0ada3ef60c 100644
--- a/chrome/browser/extensions/extension_tab_helper.h
+++ b/chrome/browser/extensions/extension_tab_helper.h
@@ -6,11 +6,13 @@
#define CHROME_BROWSER_EXTENSIONS_EXTENSION_TAB_HELPER_H_
#pragma once
-#include "content/browser/tab_contents/tab_contents_observer.h"
+#include "base/memory/weak_ptr.h"
+#include "chrome/browser/extensions/app_notify_channel_setup.h"
#include "chrome/browser/extensions/extension_function_dispatcher.h"
#include "chrome/browser/extensions/image_loading_tracker.h"
#include "chrome/browser/extensions/webstore_inline_installer.h"
#include "chrome/common/web_apps.h"
+#include "content/browser/tab_contents/tab_contents_observer.h"
#include "third_party/skia/include/core/SkBitmap.h"
class Extension;
@@ -22,10 +24,13 @@ struct LoadCommittedDetails;
}
// Per-tab extension helper. Also handles non-extension apps.
-class ExtensionTabHelper : public TabContentsObserver,
- public ExtensionFunctionDispatcher::Delegate,
- public ImageLoadingTracker::Observer,
- public WebstoreInlineInstaller::Delegate {
+class ExtensionTabHelper
+ : public TabContentsObserver,
+ public ExtensionFunctionDispatcher::Delegate,
+ public ImageLoadingTracker::Observer,
+ public WebstoreInlineInstaller::Delegate,
+ public AppNotifyChannelSetup::Delegate,
+ public base::SupportsWeakPtr<ExtensionTabHelper> {
public:
explicit ExtensionTabHelper(TabContentsWrapper* wrapper);
virtual ~ExtensionTabHelper();
@@ -100,6 +105,9 @@ class ExtensionTabHelper : public TabContentsObserver,
void OnInlineWebstoreInstall(int install_id,
const std::string& webstore_item_id,
const GURL& requestor_url);
+ void OnGetAppNotifyChannel(int request_id,
+ const GURL& requestor_url,
+ const std::string& client_id);
void OnRequest(const ExtensionHostMsg_Request_Params& params);
// App extensions related methods:
@@ -117,6 +125,11 @@ class ExtensionTabHelper : public TabContentsObserver,
virtual void OnInlineInstallFailure(int install_id,
const std::string& error) OVERRIDE;
+ // AppNotifyChannelSetup::Delegate.
+ virtual void AppNotifyChannelSetupComplete(int request_id,
+ const std::string& channel_id,
+ const std::string& error);
+
// Data for app extensions ---------------------------------------------------
// If non-null this tab is an app tab and this is the extension the tab was
« no previous file with comments | « chrome/browser/extensions/app_notify_channel_setup_unittest.cc ('k') | chrome/browser/extensions/extension_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698