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

Side by Side Diff: chrome/renderer/render_thread.cc

Issue 6576020: Remove Gears from Chrome (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: ready to review Created 9 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/renderer/render_thread.h" 5 #include "chrome/renderer/render_thread.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFontCache.h" 86 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFontCache.h"
87 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" 87 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
88 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" 88 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h"
89 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRuntimeFeatures.h" 89 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRuntimeFeatures.h"
90 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptController.h " 90 #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptController.h "
91 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h" 91 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h"
92 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageEventDispat cher.h" 92 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageEventDispat cher.h"
93 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" 93 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
94 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" 94 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
95 #include "webkit/extensions/v8/benchmarking_extension.h" 95 #include "webkit/extensions/v8/benchmarking_extension.h"
96 #include "webkit/extensions/v8/gears_extension.h"
97 #include "webkit/extensions/v8/playback_extension.h" 96 #include "webkit/extensions/v8/playback_extension.h"
98 #include "webkit/glue/webkit_glue.h" 97 #include "webkit/glue/webkit_glue.h"
99 #include "v8/include/v8.h" 98 #include "v8/include/v8.h"
100 99
101 #if defined(OS_WIN) 100 #if defined(OS_WIN)
102 #include <windows.h> 101 #include <windows.h>
103 #include <objbase.h> 102 #include <objbase.h>
104 #endif 103 #endif
105 104
106 #if defined(OS_MACOSX) 105 #if defined(OS_MACOSX)
(...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after
872 // chrome: pages should not be accessible by normal content, and should 871 // chrome: pages should not be accessible by normal content, and should
873 // also be unable to script anything but themselves (to help limit the damage 872 // also be unable to script anything but themselves (to help limit the damage
874 // that a corrupt chrome: page could cause). 873 // that a corrupt chrome: page could cause).
875 WebString chrome_ui_scheme(ASCIIToUTF16(chrome::kChromeUIScheme)); 874 WebString chrome_ui_scheme(ASCIIToUTF16(chrome::kChromeUIScheme));
876 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(chrome_ui_scheme); 875 WebSecurityPolicy::registerURLSchemeAsDisplayIsolated(chrome_ui_scheme);
877 876
878 // chrome-extension: resources shouldn't trigger insecure content warnings. 877 // chrome-extension: resources shouldn't trigger insecure content warnings.
879 WebString extension_scheme(ASCIIToUTF16(chrome::kExtensionScheme)); 878 WebString extension_scheme(ASCIIToUTF16(chrome::kExtensionScheme));
880 WebSecurityPolicy::registerURLSchemeAsSecure(extension_scheme); 879 WebSecurityPolicy::registerURLSchemeAsSecure(extension_scheme);
881 880
882 #if defined(OS_WIN)
883 // We don't yet support Gears on non-Windows, so don't tell pages that we do.
884 RegisterExtension(extensions_v8::GearsExtension::Get(), false);
885 #endif
886 RegisterExtension(extensions_v8::LoadTimesExtension::Get(), false); 881 RegisterExtension(extensions_v8::LoadTimesExtension::Get(), false);
887 RegisterExtension(extensions_v8::ChromeAppExtension::Get(), false); 882 RegisterExtension(extensions_v8::ChromeAppExtension::Get(), false);
888 RegisterExtension(extensions_v8::ExternalExtension::Get(), false); 883 RegisterExtension(extensions_v8::ExternalExtension::Get(), false);
889 RegisterExtension(extensions_v8::SearchBoxExtension::Get(), false); 884 RegisterExtension(extensions_v8::SearchBoxExtension::Get(), false);
890 v8::Extension* search_extension = extensions_v8::SearchExtension::Get(); 885 v8::Extension* search_extension = extensions_v8::SearchExtension::Get();
891 // search_extension is null if not enabled. 886 // search_extension is null if not enabled.
892 if (search_extension) 887 if (search_extension)
893 RegisterExtension(search_extension, false); 888 RegisterExtension(search_extension, false);
894 889
895 if (command_line.HasSwitch(switches::kEnableBenchmarking)) 890 if (command_line.HasSwitch(switches::kEnableBenchmarking))
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
1133 } 1128 }
1134 1129
1135 return false; 1130 return false;
1136 } 1131 }
1137 1132
1138 void RenderThread::RegisterExtension(v8::Extension* extension, 1133 void RenderThread::RegisterExtension(v8::Extension* extension,
1139 bool restrict_to_extensions) { 1134 bool restrict_to_extensions) {
1140 WebScriptController::registerExtension(extension); 1135 WebScriptController::registerExtension(extension);
1141 v8_extensions_[extension->name()] = restrict_to_extensions; 1136 v8_extensions_[extension->name()] = restrict_to_extensions;
1142 } 1137 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698