OLD | NEW |
---|---|
(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( | |
Devlin
2017/05/25 20:52:57
if you take the other comment, this could become
r
| |
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 | |
OLD | NEW |