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

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

Issue 10443105: Take 2 at implementing activeTab. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: empty -> is_empty Created 8 years, 6 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
« no previous file with comments | « chrome/browser/extensions/extension_tab_helper.h ('k') | chrome/browser/extensions/extension_tab_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0a57770c44da05ef4db3aacd65f4c858b0b47e14..2e4682fa3750dea663e4b29f6969e49fb2efe081 100644
--- a/chrome/browser/extensions/extension_tab_helper.cc
+++ b/chrome/browser/extensions/extension_tab_helper.cc
@@ -30,11 +30,12 @@
#include "content/public/browser/web_contents.h"
#include "ui/gfx/image/image.h"
+using content::RenderViewHost;
using content::WebContents;
using extensions::Extension;
+using extensions::PageActionController;
using extensions::ScriptBadgeController;
using extensions::ScriptExecutorImpl;
-using extensions::PageActionController;
namespace {
@@ -48,7 +49,8 @@ ExtensionTabHelper::ExtensionTabHelper(TabContents* tab_contents)
extension_app_(NULL),
ALLOW_THIS_IN_INITIALIZER_LIST(
extension_function_dispatcher_(tab_contents->profile(), this)),
- tab_contents_(tab_contents) {
+ tab_contents_(tab_contents),
+ active_tab_permission_manager_(tab_contents) {
if (extensions::switch_utils::IsActionBoxEnabled()) {
script_badge_controller_ = new ScriptBadgeController(tab_contents);
} else {
@@ -75,6 +77,14 @@ void ExtensionTabHelper::GetApplicationInfo(int32 page_id) {
Send(new ExtensionMsg_GetApplicationInfo(routing_id(), page_id));
}
+int ExtensionTabHelper::tab_id() const {
+ return tab_contents_->restore_tab_helper()->session_id().id();
+}
+
+int ExtensionTabHelper::window_id() const {
+ return tab_contents_->restore_tab_helper()->window_id().id();
+}
+
void ExtensionTabHelper::SetExtensionApp(const Extension* extension) {
DCHECK(!extension || extension->GetFullLaunchURL().is_valid());
extension_app_ = extension;
@@ -121,6 +131,11 @@ extensions::LocationBarController*
return location_bar_controller_.get();
}
+void ExtensionTabHelper::RenderViewCreated(RenderViewHost* render_view_host) {
+ render_view_host->Send(
+ new ExtensionMsg_SetTabId(render_view_host->GetRoutingID(), tab_id()));
+}
+
void ExtensionTabHelper::DidNavigateMainFrame(
const content::LoadCommittedDetails& details,
const content::FrameNavigateParams& params) {
« no previous file with comments | « chrome/browser/extensions/extension_tab_helper.h ('k') | chrome/browser/extensions/extension_tab_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698