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

Side by Side Diff: chrome/browser/chromeos/extensions/active_tab_permission_granter_delegate_chromeos.cc

Issue 2858013002: PS - Showing permission prompt for activeTab (Closed)
Patch Set: Changed permission prompt message Created 3 years, 7 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
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/chromeos/extensions/active_tab_permission_granter_deleg ate_chromeos.h"
6
7 #include "chrome/browser/chromeos/extensions/public_session_permission_helper.h"
8 #include "chrome/browser/profiles/profiles_state.h"
9 #include "extensions/common/extension.h"
10 #include "extensions/common/permissions/api_permission.h"
11
12 namespace extensions {
13
14 ActiveTabPermissionGranterDelegateChromeOS::
15 ActiveTabPermissionGranterDelegateChromeOS() {}
16
17 ActiveTabPermissionGranterDelegateChromeOS::
18 ~ActiveTabPermissionGranterDelegateChromeOS() {}
19
20 bool ActiveTabPermissionGranterDelegateChromeOS::ShouldGrantActiveTab(
21 const Extension* extension,
22 content::WebContents* web_contents) {
23 bool already_handled = permission_helper::HandlePermissionRequest(
24 *extension, {APIPermission::kActiveTab}, web_contents,
25 permission_helper::RequestResolvedCallback(),
26 permission_helper::PromptFactory());
27
28 return already_handled && permission_helper::PermissionAllowed(
29 extension, APIPermission::kActiveTab);
30 }
31
32 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698