OLD | NEW |
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 1855 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1866 base::StringPiece stream_as_string( | 1866 base::StringPiece stream_as_string( |
1867 reinterpret_cast<const char*>(vector_as_array(&data)), data.size()); | 1867 reinterpret_cast<const char*>(vector_as_array(&data)), data.size()); |
1868 | 1868 |
1869 base::Base64Encode(stream_as_string, &base64_result); | 1869 base::Base64Encode(stream_as_string, &base64_result); |
1870 base64_result.insert(0, base::StringPrintf("data:%s;base64,", | 1870 base64_result.insert(0, base::StringPrintf("data:%s;base64,", |
1871 mime_type.c_str())); | 1871 mime_type.c_str())); |
1872 SetResult(new StringValue(base64_result)); | 1872 SetResult(new StringValue(base64_result)); |
1873 SendResponse(true); | 1873 SendResponse(true); |
1874 } | 1874 } |
1875 | 1875 |
1876 void TabsCaptureVisibleTabFunction::RegisterUserPrefs( | 1876 void TabsCaptureVisibleTabFunction::RegisterProfilePrefs( |
1877 user_prefs::PrefRegistrySyncable* registry) { | 1877 user_prefs::PrefRegistrySyncable* registry) { |
1878 registry->RegisterBooleanPref( | 1878 registry->RegisterBooleanPref( |
1879 prefs::kDisableScreenshots, | 1879 prefs::kDisableScreenshots, |
1880 false, | 1880 false, |
1881 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); | 1881 user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF); |
1882 } | 1882 } |
1883 | 1883 |
1884 bool TabsDetectLanguageFunction::RunImpl() { | 1884 bool TabsDetectLanguageFunction::RunImpl() { |
1885 scoped_ptr<tabs::DetectLanguage::Params> params( | 1885 scoped_ptr<tabs::DetectLanguage::Params> params( |
1886 tabs::DetectLanguage::Params::Create(*args_)); | 1886 tabs::DetectLanguage::Params::Create(*args_)); |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2073 execute_tab_id_ = tab_id; | 2073 execute_tab_id_ = tab_id; |
2074 details_ = details.Pass(); | 2074 details_ = details.Pass(); |
2075 return true; | 2075 return true; |
2076 } | 2076 } |
2077 | 2077 |
2078 bool TabsInsertCSSFunction::ShouldInsertCSS() const { | 2078 bool TabsInsertCSSFunction::ShouldInsertCSS() const { |
2079 return true; | 2079 return true; |
2080 } | 2080 } |
2081 | 2081 |
2082 } // namespace extensions | 2082 } // namespace extensions |
OLD | NEW |