| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 #include "grit/generated_resources.h" | 55 #include "grit/generated_resources.h" |
| 56 #include "ipc/ipc_logging.h" | 56 #include "ipc/ipc_logging.h" |
| 57 #include "ipc/ipc_message.h" | 57 #include "ipc/ipc_message.h" |
| 58 #include "ipc/ipc_platform_file.h" | 58 #include "ipc/ipc_platform_file.h" |
| 59 #include "ipc/ipc_switches.h" | 59 #include "ipc/ipc_switches.h" |
| 60 | 60 |
| 61 #if defined(OS_WIN) | 61 #if defined(OS_WIN) |
| 62 #include "app/win_util.h" | 62 #include "app/win_util.h" |
| 63 #endif | 63 #endif |
| 64 | 64 |
| 65 #if defined(OS_MACOSX) | |
| 66 #include "chrome/browser/mach_broker_mac.h" | |
| 67 #endif | |
| 68 | |
| 69 using WebKit::WebCache; | 65 using WebKit::WebCache; |
| 70 | 66 |
| 71 #include "third_party/skia/include/core/SkBitmap.h" | 67 #include "third_party/skia/include/core/SkBitmap.h" |
| 72 | 68 |
| 73 | 69 |
| 74 // This class creates the IO thread for the renderer when running in | 70 // This class creates the IO thread for the renderer when running in |
| 75 // single-process mode. It's not used in multi-process mode. | 71 // single-process mode. It's not used in multi-process mode. |
| 76 class RendererMainThread : public base::Thread { | 72 class RendererMainThread : public base::Thread { |
| 77 public: | 73 public: |
| 78 explicit RendererMainThread(const std::string& channel_id) | 74 explicit RendererMainThread(const std::string& channel_id) |
| (...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 834 | 830 |
| 835 IDMap<IPC::Channel::Listener>::iterator iter(&listeners_); | 831 IDMap<IPC::Channel::Listener>::iterator iter(&listeners_); |
| 836 while (!iter.IsAtEnd()) { | 832 while (!iter.IsAtEnd()) { |
| 837 iter.GetCurrentValue()->OnMessageReceived( | 833 iter.GetCurrentValue()->OnMessageReceived( |
| 838 ViewHostMsg_RenderViewGone(iter.GetCurrentKey())); | 834 ViewHostMsg_RenderViewGone(iter.GetCurrentKey())); |
| 839 iter.Advance(); | 835 iter.Advance(); |
| 840 } | 836 } |
| 841 | 837 |
| 842 ClearTransportDIBCache(); | 838 ClearTransportDIBCache(); |
| 843 | 839 |
| 844 #if defined(OS_MACOSX) | |
| 845 if (child_process_.get()) | |
| 846 MachBroker::instance()->Invalidate(child_process_->GetHandle()); | |
| 847 #endif | |
| 848 | |
| 849 // this object is not deleted at this point and may be reused later. | 840 // this object is not deleted at this point and may be reused later. |
| 850 // TODO(darin): clean this up | 841 // TODO(darin): clean this up |
| 851 } | 842 } |
| 852 | 843 |
| 853 void BrowserRenderProcessHost::OnPageContents(const GURL& url, | 844 void BrowserRenderProcessHost::OnPageContents(const GURL& url, |
| 854 int32 page_id, | 845 int32 page_id, |
| 855 const std::wstring& contents) { | 846 const std::wstring& contents) { |
| 856 Profile* p = profile(); | 847 Profile* p = profile(); |
| 857 if (!p || p->IsOffTheRecord()) | 848 if (!p || p->IsOffTheRecord()) |
| 858 return; | 849 return; |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1012 IPC::PlatformFileForTransit(), | 1003 IPC::PlatformFileForTransit(), |
| 1013 std::vector<std::string>(), | 1004 std::vector<std::string>(), |
| 1014 std::string(), | 1005 std::string(), |
| 1015 false)); | 1006 false)); |
| 1016 } | 1007 } |
| 1017 } | 1008 } |
| 1018 | 1009 |
| 1019 void BrowserRenderProcessHost::EnableAutoSpellCorrect(bool enable) { | 1010 void BrowserRenderProcessHost::EnableAutoSpellCorrect(bool enable) { |
| 1020 Send(new ViewMsg_SpellChecker_EnableAutoSpellCorrect(enable)); | 1011 Send(new ViewMsg_SpellChecker_EnableAutoSpellCorrect(enable)); |
| 1021 } | 1012 } |
| OLD | NEW |