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

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

Issue 12079097: Introduce PrefRegistrySyncable, simplifying PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head again; base::File changes conflicted. Created 7 years, 10 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 14 matching lines...) Expand all
25 #include "chrome/browser/extensions/extension_function_util.h" 25 #include "chrome/browser/extensions/extension_function_util.h"
26 #include "chrome/browser/extensions/extension_host.h" 26 #include "chrome/browser/extensions/extension_host.h"
27 #include "chrome/browser/extensions/extension_service.h" 27 #include "chrome/browser/extensions/extension_service.h"
28 #include "chrome/browser/extensions/extension_tab_util.h" 28 #include "chrome/browser/extensions/extension_tab_util.h"
29 #include "chrome/browser/extensions/file_reader.h" 29 #include "chrome/browser/extensions/file_reader.h"
30 #include "chrome/browser/extensions/script_executor.h" 30 #include "chrome/browser/extensions/script_executor.h"
31 #include "chrome/browser/extensions/tab_helper.h" 31 #include "chrome/browser/extensions/tab_helper.h"
32 #include "chrome/browser/extensions/window_controller.h" 32 #include "chrome/browser/extensions/window_controller.h"
33 #include "chrome/browser/extensions/window_controller_list.h" 33 #include "chrome/browser/extensions/window_controller_list.h"
34 #include "chrome/browser/prefs/incognito_mode_prefs.h" 34 #include "chrome/browser/prefs/incognito_mode_prefs.h"
35 #include "chrome/browser/prefs/pref_registry_syncable.h"
35 #include "chrome/browser/prefs/pref_service.h" 36 #include "chrome/browser/prefs/pref_service.h"
36 #include "chrome/browser/profiles/profile.h" 37 #include "chrome/browser/profiles/profile.h"
37 #include "chrome/browser/translate/translate_tab_helper.h" 38 #include "chrome/browser/translate/translate_tab_helper.h"
38 #include "chrome/browser/ui/browser.h" 39 #include "chrome/browser/ui/browser.h"
39 #include "chrome/browser/ui/browser_commands.h" 40 #include "chrome/browser/ui/browser_commands.h"
40 #include "chrome/browser/ui/browser_finder.h" 41 #include "chrome/browser/ui/browser_finder.h"
41 #include "chrome/browser/ui/browser_iterator.h" 42 #include "chrome/browser/ui/browser_iterator.h"
42 #include "chrome/browser/ui/browser_navigator.h" 43 #include "chrome/browser/ui/browser_navigator.h"
43 #include "chrome/browser/ui/browser_tabstrip.h" 44 #include "chrome/browser/ui/browser_tabstrip.h"
44 #include "chrome/browser/ui/browser_window.h" 45 #include "chrome/browser/ui/browser_window.h"
(...skipping 1761 matching lines...) Expand 10 before | Expand all | Expand 10 after
1806 reinterpret_cast<const char*>(vector_as_array(&data)), data.size()); 1807 reinterpret_cast<const char*>(vector_as_array(&data)), data.size());
1807 1808
1808 base::Base64Encode(stream_as_string, &base64_result); 1809 base::Base64Encode(stream_as_string, &base64_result);
1809 base64_result.insert(0, base::StringPrintf("data:%s;base64,", 1810 base64_result.insert(0, base::StringPrintf("data:%s;base64,",
1810 mime_type.c_str())); 1811 mime_type.c_str()));
1811 SetResult(new StringValue(base64_result)); 1812 SetResult(new StringValue(base64_result));
1812 SendResponse(true); 1813 SendResponse(true);
1813 } 1814 }
1814 1815
1815 void TabsCaptureVisibleTabFunction::RegisterUserPrefs( 1816 void TabsCaptureVisibleTabFunction::RegisterUserPrefs(
1816 PrefServiceSyncable* service) { 1817 PrefRegistrySyncable* registry) {
1817 service->RegisterBooleanPref(prefs::kDisableScreenshots, false, 1818 registry->RegisterBooleanPref(prefs::kDisableScreenshots, false,
1818 PrefServiceSyncable::UNSYNCABLE_PREF); 1819 PrefRegistrySyncable::UNSYNCABLE_PREF);
1819 } 1820 }
1820 1821
1821 bool TabsDetectLanguageFunction::RunImpl() { 1822 bool TabsDetectLanguageFunction::RunImpl() {
1822 int tab_id = 0; 1823 int tab_id = 0;
1823 Browser* browser = NULL; 1824 Browser* browser = NULL;
1824 WebContents* contents = NULL; 1825 WebContents* contents = NULL;
1825 1826
1826 // If |tab_id| is specified, look for it. Otherwise default to selected tab 1827 // If |tab_id| is specified, look for it. Otherwise default to selected tab
1827 // in the current window. 1828 // in the current window.
1828 if (HasOptionalArgument(0)) { 1829 if (HasOptionalArgument(0)) {
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
2128 extension->id(), 2129 extension->id(),
2129 script_type, 2130 script_type,
2130 code_string, 2131 code_string,
2131 frame_scope, 2132 frame_scope,
2132 run_at, 2133 run_at,
2133 ScriptExecutor::ISOLATED_WORLD, 2134 ScriptExecutor::ISOLATED_WORLD,
2134 false /* is_web_view */, 2135 false /* is_web_view */,
2135 base::Bind(&ExecuteCodeInTabFunction::OnExecuteCodeFinished, this)); 2136 base::Bind(&ExecuteCodeInTabFunction::OnExecuteCodeFinished, this));
2136 return true; 2137 return true;
2137 } 2138 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/tabs/tabs_api.h ('k') | chrome/browser/extensions/component_loader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698