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

Side by Side Diff: chrome/browser/extensions/api/tabs/tabs_api.cc

Issue 16295003: Update chrome/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 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 unified diff | Download patch | Annotate | Revision Log
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/api/tabs/tabs_api.h" 5 #include "chrome/browser/extensions/api/tabs/tabs_api.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1949 matching lines...) Expand 10 before | Expand all | Expand 10 after
1960 Release(); // Balanced in Run() 1960 Release(); // Balanced in Run()
1961 } 1961 }
1962 1962
1963 ExecuteCodeInTabFunction::ExecuteCodeInTabFunction() 1963 ExecuteCodeInTabFunction::ExecuteCodeInTabFunction()
1964 : execute_tab_id_(-1) { 1964 : execute_tab_id_(-1) {
1965 } 1965 }
1966 1966
1967 ExecuteCodeInTabFunction::~ExecuteCodeInTabFunction() {} 1967 ExecuteCodeInTabFunction::~ExecuteCodeInTabFunction() {}
1968 1968
1969 bool ExecuteCodeInTabFunction::HasPermission() { 1969 bool ExecuteCodeInTabFunction::HasPermission() {
1970 if (Init() && 1970 if (Init() && PermissionsData::HasAPIPermissionForTab(
1971 PermissionsData::HasAPIPermissionForTab( 1971 extension_.get(), execute_tab_id_, APIPermission::kTab)) {
1972 extension_, execute_tab_id_, APIPermission::kTab)) {
1973 return true; 1972 return true;
1974 } 1973 }
1975 return ExtensionFunction::HasPermission(); 1974 return ExtensionFunction::HasPermission();
1976 } 1975 }
1977 1976
1978 bool ExecuteCodeInTabFunction::CanExecuteScriptOnPage() { 1977 bool ExecuteCodeInTabFunction::CanExecuteScriptOnPage() {
1979 content::WebContents* contents = NULL; 1978 content::WebContents* contents = NULL;
1980 1979
1981 // If |tab_id| is specified, look for the tab. Otherwise default to selected 1980 // If |tab_id| is specified, look for the tab. Otherwise default to selected
1982 // tab in the current window. 1981 // tab in the current window.
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
2068 execute_tab_id_ = tab_id; 2067 execute_tab_id_ = tab_id;
2069 details_ = details.Pass(); 2068 details_ = details.Pass();
2070 return true; 2069 return true;
2071 } 2070 }
2072 2071
2073 bool TabsInsertCSSFunction::ShouldInsertCSS() const { 2072 bool TabsInsertCSSFunction::ShouldInsertCSS() const {
2074 return true; 2073 return true;
2075 } 2074 }
2076 2075
2077 } // namespace extensions 2076 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/system_info/system_info_provider.h ('k') | chrome/browser/extensions/api/usb/usb_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698