OLD | NEW |
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 #include "chrome/browser/renderer_host/resource_message_filter.h" | 5 #include "chrome/browser/renderer_host/resource_message_filter.h" |
6 | 6 |
7 #include "app/clipboard/clipboard.h" | 7 #include "app/clipboard/clipboard.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 1035 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1046 &ResourceMessageFilter::UpdateHostZoomLevelsOnUIThread, | 1046 &ResourceMessageFilter::UpdateHostZoomLevelsOnUIThread, |
1047 host, zoom_level)); | 1047 host, zoom_level)); |
1048 } | 1048 } |
1049 | 1049 |
1050 void ResourceMessageFilter::UpdateHostZoomLevelsOnUIThread( | 1050 void ResourceMessageFilter::UpdateHostZoomLevelsOnUIThread( |
1051 const std::string& host, | 1051 const std::string& host, |
1052 int zoom_level) { | 1052 int zoom_level) { |
1053 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI)); | 1053 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI)); |
1054 host_zoom_map_->SetZoomLevel(host, zoom_level); | 1054 host_zoom_map_->SetZoomLevel(host, zoom_level); |
1055 | 1055 |
1056 // Notify renderers. | 1056 // Notify renderers from this profile. |
1057 for (RenderProcessHost::iterator i(RenderProcessHost::AllHostsIterator()); | 1057 for (RenderProcessHost::iterator i(RenderProcessHost::AllHostsIterator()); |
1058 !i.IsAtEnd(); i.Advance()) { | 1058 !i.IsAtEnd(); i.Advance()) { |
1059 RenderProcessHost* render_process_host = i.GetCurrentValue(); | 1059 RenderProcessHost* render_process_host = i.GetCurrentValue(); |
1060 render_process_host->Send( | 1060 if (render_process_host->profile() == profile_) { |
1061 new ViewMsg_SetZoomLevelForCurrentHost(host, zoom_level)); | 1061 render_process_host->Send( |
| 1062 new ViewMsg_SetZoomLevelForCurrentHost(host, zoom_level)); |
| 1063 } |
1062 } | 1064 } |
1063 } | 1065 } |
1064 | 1066 |
1065 void ResourceMessageFilter::OnResolveProxy(const GURL& url, | 1067 void ResourceMessageFilter::OnResolveProxy(const GURL& url, |
1066 IPC::Message* reply_msg) { | 1068 IPC::Message* reply_msg) { |
1067 resolve_proxy_msg_helper_.Start(url, reply_msg); | 1069 resolve_proxy_msg_helper_.Start(url, reply_msg); |
1068 } | 1070 } |
1069 | 1071 |
1070 void ResourceMessageFilter::OnResolveProxyCompleted( | 1072 void ResourceMessageFilter::OnResolveProxyCompleted( |
1071 IPC::Message* reply_msg, | 1073 IPC::Message* reply_msg, |
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1467 dictionary_map.insert( | 1469 dictionary_map.insert( |
1468 std::make_pair(ExtensionMessageBundle::kExtensionIdKey, extension_id)); | 1470 std::make_pair(ExtensionMessageBundle::kExtensionIdKey, extension_id)); |
1469 | 1471 |
1470 ViewHostMsg_GetExtensionMessageBundle::WriteReplyParams( | 1472 ViewHostMsg_GetExtensionMessageBundle::WriteReplyParams( |
1471 reply_msg, dictionary_map); | 1473 reply_msg, dictionary_map); |
1472 | 1474 |
1473 ChromeThread::PostTask( | 1475 ChromeThread::PostTask( |
1474 ChromeThread::IO, FROM_HERE, | 1476 ChromeThread::IO, FROM_HERE, |
1475 NewRunnableMethod(this, &ResourceMessageFilter::Send, reply_msg)); | 1477 NewRunnableMethod(this, &ResourceMessageFilter::Send, reply_msg)); |
1476 } | 1478 } |
OLD | NEW |