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/browser/renderer_host/render_view_host_impl.h" | 5 #include "content/browser/renderer_host/render_view_host_impl.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 | 487 |
488 // Certain GPU features might have been blacklisted. | 488 // Certain GPU features might have been blacklisted. |
489 GpuDataManagerImpl::GetInstance()->UpdateRendererWebPrefs(&prefs); | 489 GpuDataManagerImpl::GetInstance()->UpdateRendererWebPrefs(&prefs); |
490 | 490 |
491 if (ChildProcessSecurityPolicyImpl::GetInstance()->HasWebUIBindings( | 491 if (ChildProcessSecurityPolicyImpl::GetInstance()->HasWebUIBindings( |
492 GetProcess()->GetID())) { | 492 GetProcess()->GetID())) { |
493 prefs.loads_images_automatically = true; | 493 prefs.loads_images_automatically = true; |
494 prefs.javascript_enabled = true; | 494 prefs.javascript_enabled = true; |
495 } | 495 } |
496 | 496 |
497 prefs.connection_type = net::NetworkChangeNotifier::GetConnectionType(); | 497 net::NetworkChangeNotifier::GetMaxBandwidthAndConnectionType( |
498 prefs.is_online = | 498 &prefs.net_info_max_bandwidth_mbps, &prefs.net_info_connection_type); |
499 prefs.connection_type != net::NetworkChangeNotifier::CONNECTION_NONE; | 499 prefs.is_online = prefs.net_info_connection_type != |
| 500 net::NetworkChangeNotifier::CONNECTION_NONE; |
500 | 501 |
501 prefs.number_of_cpu_cores = base::SysInfo::NumberOfProcessors(); | 502 prefs.number_of_cpu_cores = base::SysInfo::NumberOfProcessors(); |
502 | 503 |
503 prefs.viewport_enabled = | 504 prefs.viewport_enabled = |
504 command_line.HasSwitch(switches::kEnableViewport) || | 505 command_line.HasSwitch(switches::kEnableViewport) || |
505 prefs.viewport_meta_enabled; | 506 prefs.viewport_meta_enabled; |
506 | 507 |
507 prefs.main_frame_resizes_are_orientation_changes = | 508 prefs.main_frame_resizes_are_orientation_changes = |
508 command_line.HasSwitch(switches::kMainFrameResizesAreOrientationChanges); | 509 command_line.HasSwitch(switches::kMainFrameResizesAreOrientationChanges); |
509 | 510 |
(...skipping 920 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1430 if (!policy->CanReadFile(GetProcess()->GetID(), file)) | 1431 if (!policy->CanReadFile(GetProcess()->GetID(), file)) |
1431 policy->GrantReadFile(GetProcess()->GetID(), file); | 1432 policy->GrantReadFile(GetProcess()->GetID(), file); |
1432 } | 1433 } |
1433 } | 1434 } |
1434 | 1435 |
1435 void RenderViewHostImpl::SelectWordAroundCaret() { | 1436 void RenderViewHostImpl::SelectWordAroundCaret() { |
1436 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); | 1437 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); |
1437 } | 1438 } |
1438 | 1439 |
1439 } // namespace content | 1440 } // namespace content |
OLD | NEW |