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

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

Issue 3312017: Plumbs through window.chrome.setSuggestResult. (Closed)
Patch Set: more comments Created 10 years, 3 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
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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 #include "chrome/renderer/indexed_db_dispatcher.h" 58 #include "chrome/renderer/indexed_db_dispatcher.h"
59 #include "chrome/renderer/loadtimes_extension_bindings.h" 59 #include "chrome/renderer/loadtimes_extension_bindings.h"
60 #include "chrome/renderer/net/renderer_net_predictor.h" 60 #include "chrome/renderer/net/renderer_net_predictor.h"
61 #include "chrome/renderer/plugin_channel_host.h" 61 #include "chrome/renderer/plugin_channel_host.h"
62 #include "chrome/renderer/render_process_impl.h" 62 #include "chrome/renderer/render_process_impl.h"
63 #include "chrome/renderer/render_view.h" 63 #include "chrome/renderer/render_view.h"
64 #include "chrome/renderer/render_view_visitor.h" 64 #include "chrome/renderer/render_view_visitor.h"
65 #include "chrome/renderer/renderer_histogram_snapshots.h" 65 #include "chrome/renderer/renderer_histogram_snapshots.h"
66 #include "chrome/renderer/renderer_webidbfactory_impl.h" 66 #include "chrome/renderer/renderer_webidbfactory_impl.h"
67 #include "chrome/renderer/renderer_webkitclient_impl.h" 67 #include "chrome/renderer/renderer_webkitclient_impl.h"
68 #include "chrome/renderer/search_extension.h"
68 #include "chrome/renderer/spellchecker/spellcheck.h" 69 #include "chrome/renderer/spellchecker/spellcheck.h"
69 #include "chrome/renderer/user_script_slave.h" 70 #include "chrome/renderer/user_script_slave.h"
70 #include "ipc/ipc_channel_handle.h" 71 #include "ipc/ipc_channel_handle.h"
71 #include "ipc/ipc_message.h" 72 #include "ipc/ipc_message.h"
72 #include "ipc/ipc_platform_file.h" 73 #include "ipc/ipc_platform_file.h"
73 #include "net/base/net_util.h" 74 #include "net/base/net_util.h"
74 #include "third_party/sqlite/sqlite3.h" 75 #include "third_party/sqlite/sqlite3.h"
75 #include "third_party/tcmalloc/chromium/src/google/malloc_extension.h" 76 #include "third_party/tcmalloc/chromium/src/google/malloc_extension.h"
76 #include "third_party/WebKit/WebKit/chromium/public/WebCache.h" 77 #include "third_party/WebKit/WebKit/chromium/public/WebCache.h"
77 #include "third_party/WebKit/WebKit/chromium/public/WebColor.h" 78 #include "third_party/WebKit/WebKit/chromium/public/WebColor.h"
(...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after
848 #if defined(OS_WIN) 849 #if defined(OS_WIN)
849 // We don't yet support Gears on non-Windows, so don't tell pages that we do. 850 // We don't yet support Gears on non-Windows, so don't tell pages that we do.
850 WebScriptController::registerExtension(extensions_v8::GearsExtension::Get()); 851 WebScriptController::registerExtension(extensions_v8::GearsExtension::Get());
851 #endif 852 #endif
852 WebScriptController::registerExtension( 853 WebScriptController::registerExtension(
853 extensions_v8::LoadTimesExtension::Get()); 854 extensions_v8::LoadTimesExtension::Get());
854 WebScriptController::registerExtension( 855 WebScriptController::registerExtension(
855 extensions_v8::ChromeAppExtension::Get()); 856 extensions_v8::ChromeAppExtension::Get());
856 WebScriptController::registerExtension( 857 WebScriptController::registerExtension(
857 extensions_v8::ExternalExtension::Get()); 858 extensions_v8::ExternalExtension::Get());
859 v8::Extension* search_extension = extensions_v8::SearchExtension::Get();
860 // search_extension is null if not enabled.
861 if (search_extension)
862 WebScriptController::registerExtension(search_extension);
858 863
859 // TODO(rafaelw). Note that extension-related v8 extensions are being 864 // TODO(rafaelw). Note that extension-related v8 extensions are being
860 // bound currently based on is_extension_process_. This means that 865 // bound currently based on is_extension_process_. This means that
861 // non-extension renderers that slip into an extension process (for example, 866 // non-extension renderers that slip into an extension process (for example,
862 // an extension page opening an iframe) will be extension bindings setup. 867 // an extension page opening an iframe) will be extension bindings setup.
863 // This should be relatively rare, and the offending page won't be able to 868 // This should be relatively rare, and the offending page won't be able to
864 // make extension API requests because it'll be denied on both sides of 869 // make extension API requests because it'll be denied on both sides of
865 // the renderer by a permission check. However, this is still fairly lame 870 // the renderer by a permission check. However, this is still fairly lame
866 // and we should consider implementing a V8Proxy delegate that calls out 871 // and we should consider implementing a V8Proxy delegate that calls out
867 // to the render thread and makes a decision as to whether to bind these 872 // to the render thread and makes a decision as to whether to bind these
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
1101 1106
1102 scoped_refptr<base::MessageLoopProxy> 1107 scoped_refptr<base::MessageLoopProxy>
1103 RenderThread::GetFileThreadMessageLoopProxy() { 1108 RenderThread::GetFileThreadMessageLoopProxy() {
1104 DCHECK(message_loop() == MessageLoop::current()); 1109 DCHECK(message_loop() == MessageLoop::current());
1105 if (!file_thread_.get()) { 1110 if (!file_thread_.get()) {
1106 file_thread_.reset(new base::Thread("Renderer::FILE")); 1111 file_thread_.reset(new base::Thread("Renderer::FILE"));
1107 file_thread_->Start(); 1112 file_thread_->Start();
1108 } 1113 }
1109 return file_thread_->message_loop_proxy(); 1114 return file_thread_->message_loop_proxy();
1110 } 1115 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698