OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/browser/renderer_host/render_view_host.h" | 5 #include "content/browser/renderer_host/render_view_host.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
12 #include "base/i18n/rtl.h" | 12 #include "base/i18n/rtl.h" |
13 #include "base/json/json_reader.h" | 13 #include "base/json/json_reader.h" |
14 #include "base/string_util.h" | 14 #include "base/string_util.h" |
15 #include "base/time.h" | 15 #include "base/time.h" |
16 #include "base/utf_string_conversions.h" | 16 #include "base/utf_string_conversions.h" |
17 #include "base/values.h" | 17 #include "base/values.h" |
18 #include "chrome/browser/profiles/profile.h" | 18 #include "content/browser/browser_context.h" |
19 #include "content/browser/browser_message_filter.h" | 19 #include "content/browser/browser_message_filter.h" |
20 #include "content/browser/child_process_security_policy.h" | 20 #include "content/browser/child_process_security_policy.h" |
21 #include "content/browser/content_browser_client.h" | 21 #include "content/browser/content_browser_client.h" |
22 #include "content/browser/cross_site_request_manager.h" | 22 #include "content/browser/cross_site_request_manager.h" |
23 #include "content/browser/host_zoom_map.h" | 23 #include "content/browser/host_zoom_map.h" |
24 #include "content/browser/in_process_webkit/session_storage_namespace.h" | 24 #include "content/browser/in_process_webkit/session_storage_namespace.h" |
25 #include "content/browser/renderer_host/render_process_host.h" | 25 #include "content/browser/renderer_host/render_process_host.h" |
26 #include "content/browser/renderer_host/render_view_host_delegate.h" | 26 #include "content/browser/renderer_host/render_view_host_delegate.h" |
27 #include "content/browser/renderer_host/render_view_host_observer.h" | 27 #include "content/browser/renderer_host/render_view_host_observer.h" |
28 #include "content/browser/renderer_host/render_widget_host.h" | 28 #include "content/browser/renderer_host/render_widget_host.h" |
(...skipping 1245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1274 Details<std::pair<int, Value*> >(&details)); | 1274 Details<std::pair<int, Value*> >(&details)); |
1275 } | 1275 } |
1276 | 1276 |
1277 void RenderViewHost::OnDidZoomURL(double zoom_level, | 1277 void RenderViewHost::OnDidZoomURL(double zoom_level, |
1278 bool remember, | 1278 bool remember, |
1279 const GURL& url) { | 1279 const GURL& url) { |
1280 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 1280 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
1281 HostZoomMap* host_zoom_map = process()->browser_context()->GetHostZoomMap(); | 1281 HostZoomMap* host_zoom_map = process()->browser_context()->GetHostZoomMap(); |
1282 if (remember) { | 1282 if (remember) { |
1283 host_zoom_map->SetZoomLevel(net::GetHostOrSpecFromURL(url), zoom_level); | 1283 host_zoom_map->SetZoomLevel(net::GetHostOrSpecFromURL(url), zoom_level); |
1284 // Notify renderers from this profile. | 1284 // Notify renderers from this browser context. |
1285 for (RenderProcessHost::iterator i(RenderProcessHost::AllHostsIterator()); | 1285 for (RenderProcessHost::iterator i(RenderProcessHost::AllHostsIterator()); |
1286 !i.IsAtEnd(); i.Advance()) { | 1286 !i.IsAtEnd(); i.Advance()) { |
1287 RenderProcessHost* render_process_host = i.GetCurrentValue(); | 1287 RenderProcessHost* render_process_host = i.GetCurrentValue(); |
1288 if (render_process_host->browser_context() == | 1288 if (render_process_host->browser_context() == |
1289 process()->browser_context()) { | 1289 process()->browser_context()) { |
1290 render_process_host->Send( | 1290 render_process_host->Send( |
1291 new ViewMsg_SetZoomLevelForCurrentURL(url, zoom_level)); | 1291 new ViewMsg_SetZoomLevelForCurrentURL(url, zoom_level)); |
1292 } | 1292 } |
1293 } | 1293 } |
1294 } else { | 1294 } else { |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1332 if (view) { | 1332 if (view) { |
1333 view->ShowPopupMenu(params.bounds, | 1333 view->ShowPopupMenu(params.bounds, |
1334 params.item_height, | 1334 params.item_height, |
1335 params.item_font_size, | 1335 params.item_font_size, |
1336 params.selected_item, | 1336 params.selected_item, |
1337 params.popup_items, | 1337 params.popup_items, |
1338 params.right_aligned); | 1338 params.right_aligned); |
1339 } | 1339 } |
1340 } | 1340 } |
1341 #endif | 1341 #endif |
OLD | NEW |