OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/shell/renderer/shell_render_process_observer.h" | 5 #include "content/shell/renderer/shell_render_process_observer.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "content/public/common/content_client.h" | 8 #include "content/public/common/content_client.h" |
9 #include "content/public/renderer/render_thread.h" | 9 #include "content/public/renderer/render_thread.h" |
10 #include "content/public/renderer/render_view.h" | 10 #include "content/public/renderer/render_view.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 | 70 |
71 test_interfaces_.reset(new WebTestInterfaces); | 71 test_interfaces_.reset(new WebTestInterfaces); |
72 test_interfaces_->resetAll(); | 72 test_interfaces_->resetAll(); |
73 } | 73 } |
74 | 74 |
75 bool ShellRenderProcessObserver::OnControlMessageReceived( | 75 bool ShellRenderProcessObserver::OnControlMessageReceived( |
76 const IPC::Message& message) { | 76 const IPC::Message& message) { |
77 bool handled = true; | 77 bool handled = true; |
78 IPC_BEGIN_MESSAGE_MAP(ShellRenderProcessObserver, message) | 78 IPC_BEGIN_MESSAGE_MAP(ShellRenderProcessObserver, message) |
79 IPC_MESSAGE_HANDLER(ShellViewMsg_SetWebKitSourceDir, OnSetWebKitSourceDir) | 79 IPC_MESSAGE_HANDLER(ShellViewMsg_SetWebKitSourceDir, OnSetWebKitSourceDir) |
80 IPC_MESSAGE_HANDLER(ShellViewMsg_LoadHyphenDictionary, | |
81 OnLoadHyphenDictionary) | |
82 IPC_MESSAGE_UNHANDLED(handled = false) | 80 IPC_MESSAGE_UNHANDLED(handled = false) |
83 IPC_END_MESSAGE_MAP() | 81 IPC_END_MESSAGE_MAP() |
84 | 82 |
85 return handled; | 83 return handled; |
86 } | 84 } |
87 | 85 |
88 void ShellRenderProcessObserver::OnSetWebKitSourceDir( | 86 void ShellRenderProcessObserver::OnSetWebKitSourceDir( |
89 const base::FilePath& webkit_source_dir) { | 87 const base::FilePath& webkit_source_dir) { |
90 webkit_source_dir_ = webkit_source_dir; | 88 webkit_source_dir_ = webkit_source_dir; |
91 } | 89 } |
92 | 90 |
93 void ShellRenderProcessObserver::OnLoadHyphenDictionary( | |
94 const IPC::PlatformFileForTransit& dict_file) { | |
95 ShellContentRendererClient::Get()->LoadHyphenDictionary( | |
96 IPC::PlatformFileForTransitToPlatformFile(dict_file)); | |
97 } | |
98 | |
99 } // namespace content | 91 } // namespace content |
OLD | NEW |