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

Side by Side Diff: chrome/browser/renderer_host/browser_render_process_host.cc

Issue 1546001: Split GpuProcessHost into GpuProcessHostUIShim, which runs on the UI... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 8 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 // 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 755 matching lines...) Expand 10 before | Expand all | Expand 10 after
766 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdatedCacheStats, 766 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdatedCacheStats,
767 OnUpdatedCacheStats) 767 OnUpdatedCacheStats)
768 IPC_MESSAGE_HANDLER(ViewHostMsg_SuddenTerminationChanged, 768 IPC_MESSAGE_HANDLER(ViewHostMsg_SuddenTerminationChanged,
769 SuddenTerminationChanged); 769 SuddenTerminationChanged);
770 IPC_MESSAGE_HANDLER(ViewHostMsg_ExtensionAddListener, 770 IPC_MESSAGE_HANDLER(ViewHostMsg_ExtensionAddListener,
771 OnExtensionAddListener) 771 OnExtensionAddListener)
772 IPC_MESSAGE_HANDLER(ViewHostMsg_ExtensionRemoveListener, 772 IPC_MESSAGE_HANDLER(ViewHostMsg_ExtensionRemoveListener,
773 OnExtensionRemoveListener) 773 OnExtensionRemoveListener)
774 IPC_MESSAGE_HANDLER(ViewHostMsg_ExtensionCloseChannel, 774 IPC_MESSAGE_HANDLER(ViewHostMsg_ExtensionCloseChannel,
775 OnExtensionCloseChannel) 775 OnExtensionCloseChannel)
776 IPC_MESSAGE_HANDLER(ViewHostMsg_EstablishGpuChannel,
777 OnMsgEstablishGpuChannel)
778 IPC_MESSAGE_HANDLER_DELAY_REPLY(ViewHostMsg_SynchronizeGpu,
779 OnMsgSynchronizeGpu)
780 IPC_MESSAGE_HANDLER(ViewHostMsg_SpellChecker_RequestDictionary, 776 IPC_MESSAGE_HANDLER(ViewHostMsg_SpellChecker_RequestDictionary,
781 OnSpellCheckerRequestDictionary) 777 OnSpellCheckerRequestDictionary)
782 IPC_MESSAGE_UNHANDLED_ERROR() 778 IPC_MESSAGE_UNHANDLED_ERROR()
783 IPC_END_MESSAGE_MAP_EX() 779 IPC_END_MESSAGE_MAP_EX()
784 780
785 if (!msg_is_ok) { 781 if (!msg_is_ok) {
786 // The message had a handler, but its de-serialization failed. 782 // The message had a handler, but its de-serialization failed.
787 // We consider this a capital crime. Kill the renderer if we have one. 783 // We consider this a capital crime. Kill the renderer if we have one.
788 ReceivedBadMessage(msg.type()); 784 ReceivedBadMessage(msg.type());
789 } 785 }
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
974 event_name, id()); 970 event_name, id());
975 } 971 }
976 } 972 }
977 973
978 void BrowserRenderProcessHost::OnExtensionCloseChannel(int port_id) { 974 void BrowserRenderProcessHost::OnExtensionCloseChannel(int port_id) {
979 if (profile()->GetExtensionMessageService()) { 975 if (profile()->GetExtensionMessageService()) {
980 profile()->GetExtensionMessageService()->CloseChannel(port_id); 976 profile()->GetExtensionMessageService()->CloseChannel(port_id);
981 } 977 }
982 } 978 }
983 979
984 void BrowserRenderProcessHost::OnMsgEstablishGpuChannel() {
985 GpuProcessHost::Get()->EstablishGpuChannel(id());
986 }
987
988 void BrowserRenderProcessHost::OnMsgSynchronizeGpu(IPC::Message* reply) {
989 GpuProcessHost::Get()->Synchronize(id(), reply);
990 }
991
992 void BrowserRenderProcessHost::OnSpellCheckerRequestDictionary() { 980 void BrowserRenderProcessHost::OnSpellCheckerRequestDictionary() {
993 if (profile()->GetSpellCheckHost()) { 981 if (profile()->GetSpellCheckHost()) {
994 // The spellchecker initialization already started and finished; just send 982 // The spellchecker initialization already started and finished; just send
995 // it to the renderer. 983 // it to the renderer.
996 InitSpellChecker(); 984 InitSpellChecker();
997 } else { 985 } else {
998 // We may have gotten multiple requests from different renderers. We don't 986 // We may have gotten multiple requests from different renderers. We don't
999 // want to initialize multiple times in this case, so we set |force| to 987 // want to initialize multiple times in this case, so we set |force| to
1000 // false. 988 // false.
1001 profile()->ReinitializeSpellCheckHost(false); 989 profile()->ReinitializeSpellCheckHost(false);
(...skipping 29 matching lines...) Expand all
1031 IPC::InvalidPlatformFileForTransit(), 1019 IPC::InvalidPlatformFileForTransit(),
1032 std::vector<std::string>(), 1020 std::vector<std::string>(),
1033 std::string(), 1021 std::string(),
1034 false)); 1022 false));
1035 } 1023 }
1036 } 1024 }
1037 1025
1038 void BrowserRenderProcessHost::EnableAutoSpellCorrect(bool enable) { 1026 void BrowserRenderProcessHost::EnableAutoSpellCorrect(bool enable) {
1039 Send(new ViewMsg_SpellChecker_EnableAutoSpellCorrect(enable)); 1027 Send(new ViewMsg_SpellChecker_EnableAutoSpellCorrect(enable));
1040 } 1028 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/browser_render_process_host.h ('k') | chrome/browser/renderer_host/gpu_view_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698