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

Side by Side Diff: chrome/browser/extensions/tab_helper.cc

Issue 10880064: Make extension commands grant the activeTab permission. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 8 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/extensions/tab_helper.h ('k') | chrome/browser/ui/cocoa/browser_window_cocoa.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/extensions/tab_helper.h" 5 #include "chrome/browser/extensions/tab_helper.h"
6 6
7 #include "chrome/browser/extensions/app_notify_channel_ui.h" 7 #include "chrome/browser/extensions/app_notify_channel_ui.h"
8 #include "chrome/browser/extensions/crx_installer.h" 8 #include "chrome/browser/extensions/crx_installer.h"
9 #include "chrome/browser/extensions/extension_service.h" 9 #include "chrome/browser/extensions/extension_service.h"
10 #include "chrome/browser/extensions/extension_tab_util.h" 10 #include "chrome/browser/extensions/extension_tab_util.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 extension_app_(NULL), 59 extension_app_(NULL),
60 ALLOW_THIS_IN_INITIALIZER_LIST( 60 ALLOW_THIS_IN_INITIALIZER_LIST(
61 extension_function_dispatcher_( 61 extension_function_dispatcher_(
62 Profile::FromBrowserContext(web_contents->GetBrowserContext()), 62 Profile::FromBrowserContext(web_contents->GetBrowserContext()),
63 this)), 63 this)),
64 pending_web_app_action_(NONE), 64 pending_web_app_action_(NONE),
65 script_executor_(web_contents) { 65 script_executor_(web_contents) {
66 // The ActiveTabPermissionManager requires a session ID; ensure this 66 // The ActiveTabPermissionManager requires a session ID; ensure this
67 // WebContents has one. 67 // WebContents has one.
68 SessionTabHelper::CreateForWebContents(web_contents); 68 SessionTabHelper::CreateForWebContents(web_contents);
69 active_tab_permission_manager_.reset(new ActiveTabPermissionManager( 69 active_tab_permission_granter_.reset(new ActiveTabPermissionGranter(
70 web_contents, 70 web_contents,
71 SessionID::IdForTab(web_contents), 71 SessionID::IdForTab(web_contents),
72 Profile::FromBrowserContext(web_contents->GetBrowserContext()))); 72 Profile::FromBrowserContext(web_contents->GetBrowserContext())));
73 if (switch_utils::AreScriptBadgesEnabled()) { 73 if (switch_utils::AreScriptBadgesEnabled()) {
74 location_bar_controller_.reset( 74 location_bar_controller_.reset(
75 new ScriptBadgeController(web_contents, &script_executor_)); 75 new ScriptBadgeController(web_contents, &script_executor_));
76 } else { 76 } else {
77 location_bar_controller_.reset( 77 location_bar_controller_.reset(
78 new PageActionController(web_contents)); 78 new PageActionController(web_contents));
79 } 79 }
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 // malware site etc). When this happens, we abort the shortcut update. 453 // malware site etc). When this happens, we abort the shortcut update.
454 NavigationEntry* entry = controller.GetLastCommittedEntry(); 454 NavigationEntry* entry = controller.GetLastCommittedEntry();
455 if (entry) 455 if (entry)
456 GetApplicationInfo(entry->GetPageID()); 456 GetApplicationInfo(entry->GetPageID());
457 else 457 else
458 pending_web_app_action_ = NONE; 458 pending_web_app_action_ = NONE;
459 } 459 }
460 } 460 }
461 461
462 } // namespace extensions 462 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/tab_helper.h ('k') | chrome/browser/ui/cocoa/browser_window_cocoa.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698