| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/browser/resource_message_filter.h" | 5 #include "chrome/browser/resource_message_filter.h" |
| 6 | 6 |
| 7 #include "base/clipboard.h" | 7 #include "base/clipboard.h" |
| 8 #include "base/gfx/native_widget_types.h" | 8 #include "base/gfx/native_widget_types.h" |
| 9 #include "base/histogram.h" | 9 #include "base/histogram.h" |
| 10 #include "base/thread.h" | 10 #include "base/thread.h" |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 if (!msg_is_ok) { | 224 if (!msg_is_ok) { |
| 225 BrowserRenderProcessHost::BadMessageTerminateProcess(message.type(), | 225 BrowserRenderProcessHost::BadMessageTerminateProcess(message.type(), |
| 226 render_handle_); | 226 render_handle_); |
| 227 } | 227 } |
| 228 | 228 |
| 229 return handled; | 229 return handled; |
| 230 } | 230 } |
| 231 | 231 |
| 232 void ResourceMessageFilter::OnReceiveContextMenuMsg(const IPC::Message& msg) { | 232 void ResourceMessageFilter::OnReceiveContextMenuMsg(const IPC::Message& msg) { |
| 233 void* iter = NULL; | 233 void* iter = NULL; |
| 234 ViewHostMsg_ContextMenu_Params params; | 234 ContextMenuParams params; |
| 235 if (!IPC::ParamTraits<ViewHostMsg_ContextMenu_Params>:: | 235 if (!IPC::ParamTraits<ContextMenuParams>::Read(&msg, &iter, ¶ms)) |
| 236 Read(&msg, &iter, ¶ms)) | |
| 237 return; | 236 return; |
| 238 | 237 |
| 239 // Fill in the dictionary suggestions if required. | 238 // Fill in the dictionary suggestions if required. |
| 240 if (!params.misspelled_word.empty() && | 239 if (!params.misspelled_word.empty() && |
| 241 spellchecker_ != NULL && params.spellcheck_enabled) { | 240 spellchecker_ != NULL && params.spellcheck_enabled) { |
| 242 int misspell_location, misspell_length; | 241 int misspell_location, misspell_length; |
| 243 bool is_misspelled = !spellchecker_->SpellCheckWord( | 242 bool is_misspelled = !spellchecker_->SpellCheckWord( |
| 244 params.misspelled_word.c_str(), | 243 params.misspelled_word.c_str(), |
| 245 static_cast<int>(params.misspelled_word.length()), | 244 static_cast<int>(params.misspelled_word.length()), |
| 246 &misspell_location, &misspell_length, | 245 &misspell_location, &misspell_length, |
| (...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 731 if (type == NotificationType::SPELLCHECKER_REINITIALIZED) { | 730 if (type == NotificationType::SPELLCHECKER_REINITIALIZED) { |
| 732 spellchecker_ = Details<SpellcheckerReinitializedDetails> | 731 spellchecker_ = Details<SpellcheckerReinitializedDetails> |
| 733 (details).ptr()->spellchecker; | 732 (details).ptr()->spellchecker; |
| 734 } | 733 } |
| 735 } | 734 } |
| 736 | 735 |
| 737 void ResourceMessageFilter::OnDnsPrefetch( | 736 void ResourceMessageFilter::OnDnsPrefetch( |
| 738 const std::vector<std::string>& hostnames) { | 737 const std::vector<std::string>& hostnames) { |
| 739 chrome_browser_net::DnsPrefetchList(hostnames); | 738 chrome_browser_net::DnsPrefetchList(hostnames); |
| 740 } | 739 } |
| OLD | NEW |