| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 | 338 |
| 339 WebKit::registerExtension(ExtensionProcessBindings::Get(), | 339 WebKit::registerExtension(ExtensionProcessBindings::Get(), |
| 340 WebKit::WebString::fromUTF8(chrome::kExtensionScheme)); | 340 WebKit::WebString::fromUTF8(chrome::kExtensionScheme)); |
| 341 | 341 |
| 342 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 342 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 343 | 343 |
| 344 // TODO(aa): Add a way to restrict extensions to the content script context | 344 // TODO(aa): Add a way to restrict extensions to the content script context |
| 345 // only so that we don't have to gate these on --enable-extensions. | 345 // only so that we don't have to gate these on --enable-extensions. |
| 346 if (command_line.HasSwitch(switches::kEnableExtensions)) { | 346 if (command_line.HasSwitch(switches::kEnableExtensions)) { |
| 347 WebKit::registerExtension(BaseJsV8Extension::Get()); | 347 WebKit::registerExtension(BaseJsV8Extension::Get()); |
| 348 WebKit::registerExtension(JsonJsV8Extension::Get()); | |
| 349 WebKit::registerExtension(JsonSchemaJsV8Extension::Get()); | 348 WebKit::registerExtension(JsonSchemaJsV8Extension::Get()); |
| 350 WebKit::registerExtension(EventBindings::Get()); | 349 WebKit::registerExtension(EventBindings::Get()); |
| 351 WebKit::registerExtension(RendererExtensionBindings::Get()); | 350 WebKit::registerExtension(RendererExtensionBindings::Get()); |
| 352 } | 351 } |
| 353 | 352 |
| 354 if (command_line.HasSwitch(switches::kPlaybackMode) || | 353 if (command_line.HasSwitch(switches::kPlaybackMode) || |
| 355 command_line.HasSwitch(switches::kRecordMode) || | 354 command_line.HasSwitch(switches::kRecordMode) || |
| 356 command_line.HasSwitch(switches::kNoJsRandomness)) { | 355 command_line.HasSwitch(switches::kNoJsRandomness)) { |
| 357 WebKit::registerExtension(extensions_v8::PlaybackExtension::Get()); | 356 WebKit::registerExtension(extensions_v8::PlaybackExtension::Get()); |
| 358 } | 357 } |
| (...skipping 22 matching lines...) Expand all Loading... |
| 381 | 380 |
| 382 void RenderThread::OnPurgePluginListCache() { | 381 void RenderThread::OnPurgePluginListCache() { |
| 383 // The call below will cause a GetPlugins call with refresh=true, but at this | 382 // The call below will cause a GetPlugins call with refresh=true, but at this |
| 384 // point we already know that the browser has refreshed its list, so disable | 383 // point we already know that the browser has refreshed its list, so disable |
| 385 // refresh temporarily to prevent each renderer process causing the list to be | 384 // refresh temporarily to prevent each renderer process causing the list to be |
| 386 // regenerated. | 385 // regenerated. |
| 387 plugin_refresh_allowed_ = false; | 386 plugin_refresh_allowed_ = false; |
| 388 WebKit::resetPluginCache(); | 387 WebKit::resetPluginCache(); |
| 389 plugin_refresh_allowed_ = true; | 388 plugin_refresh_allowed_ = true; |
| 390 } | 389 } |
| OLD | NEW |