OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // Represents the browser side of the browser <--> renderer communication | 5 // Represents the browser side of the browser <--> renderer communication |
6 // channel. There will be one RenderProcessHost per renderer process. | 6 // channel. There will be one RenderProcessHost per renderer process. |
7 | 7 |
8 #include "chrome/browser/renderer_host/browser_render_process_host.h" | 8 #include "chrome/browser/renderer_host/browser_render_process_host.h" |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 844 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
855 if (child_process_.get() && child_process_->IsStarting()) | 855 if (child_process_.get() && child_process_->IsStarting()) |
856 return; | 856 return; |
857 | 857 |
858 base::SharedMemoryHandle handle_for_process; | 858 base::SharedMemoryHandle handle_for_process; |
859 if (!shared_memory->ShareToProcess(GetHandle(), &handle_for_process)) { | 859 if (!shared_memory->ShareToProcess(GetHandle(), &handle_for_process)) { |
860 // This can legitimately fail if the renderer asserts at startup. | 860 // This can legitimately fail if the renderer asserts at startup. |
861 return; | 861 return; |
862 } | 862 } |
863 | 863 |
864 if (base::SharedMemory::IsHandleValid(handle_for_process)) { | 864 if (base::SharedMemory::IsHandleValid(handle_for_process)) { |
865 Send(new ViewMsg_UserScripts_UpdatedScripts(handle_for_process)); | 865 Send(new ExtensionMsg_UpdateUserScripts(handle_for_process)); |
866 } | 866 } |
867 } | 867 } |
868 | 868 |
869 bool BrowserRenderProcessHost::FastShutdownIfPossible() { | 869 bool BrowserRenderProcessHost::FastShutdownIfPossible() { |
870 if (run_renderer_in_process()) | 870 if (run_renderer_in_process()) |
871 return false; // Single process mode can't do fast shutdown. | 871 return false; // Single process mode can't do fast shutdown. |
872 | 872 |
873 if (!child_process_.get() || child_process_->IsStarting() || !GetHandle()) | 873 if (!child_process_.get() || child_process_->IsStarting() || !GetHandle()) |
874 return false; // Render process hasn't started or is probably crashed. | 874 return false; // Render process hasn't started or is probably crashed. |
875 | 875 |
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1311 IPC::PlatformFileForTransit file; | 1311 IPC::PlatformFileForTransit file; |
1312 #if defined(OS_POSIX) | 1312 #if defined(OS_POSIX) |
1313 file = base::FileDescriptor(model_file, false); | 1313 file = base::FileDescriptor(model_file, false); |
1314 #elif defined(OS_WIN) | 1314 #elif defined(OS_WIN) |
1315 ::DuplicateHandle(::GetCurrentProcess(), model_file, GetHandle(), &file, 0, | 1315 ::DuplicateHandle(::GetCurrentProcess(), model_file, GetHandle(), &file, 0, |
1316 false, DUPLICATE_SAME_ACCESS); | 1316 false, DUPLICATE_SAME_ACCESS); |
1317 #endif | 1317 #endif |
1318 Send(new SafeBrowsingMsg_SetPhishingModel(file)); | 1318 Send(new SafeBrowsingMsg_SetPhishingModel(file)); |
1319 } | 1319 } |
1320 } | 1320 } |
OLD | NEW |