| 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/renderer/render_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 #include "base/time/time.h" | 31 #include "base/time/time.h" |
| 32 #include "base/trace_event/trace_event.h" | 32 #include "base/trace_event/trace_event.h" |
| 33 #include "content/child/appcache/appcache_dispatcher.h" | 33 #include "content/child/appcache/appcache_dispatcher.h" |
| 34 #include "content/child/appcache/web_application_cache_host_impl.h" | 34 #include "content/child/appcache/web_application_cache_host_impl.h" |
| 35 #include "content/child/child_shared_bitmap_manager.h" | 35 #include "content/child/child_shared_bitmap_manager.h" |
| 36 #include "content/child/npapi/webplugin_delegate_impl.h" | 36 #include "content/child/npapi/webplugin_delegate_impl.h" |
| 37 #include "content/child/request_extra_data.h" | 37 #include "content/child/request_extra_data.h" |
| 38 #include "content/child/v8_value_converter_impl.h" | 38 #include "content/child/v8_value_converter_impl.h" |
| 39 #include "content/child/webmessageportchannel_impl.h" | 39 #include "content/child/webmessageportchannel_impl.h" |
| 40 #include "content/common/content_constants_internal.h" | 40 #include "content/common/content_constants_internal.h" |
| 41 #include "content/common/content_switches_internal.h" |
| 41 #include "content/common/database_messages.h" | 42 #include "content/common/database_messages.h" |
| 42 #include "content/common/dom_storage/dom_storage_types.h" | 43 #include "content/common/dom_storage/dom_storage_types.h" |
| 43 #include "content/common/drag_messages.h" | 44 #include "content/common/drag_messages.h" |
| 44 #include "content/common/frame_messages.h" | 45 #include "content/common/frame_messages.h" |
| 45 #include "content/common/frame_replication_state.h" | 46 #include "content/common/frame_replication_state.h" |
| 46 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" | 47 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" |
| 47 #include "content/common/input_messages.h" | 48 #include "content/common/input_messages.h" |
| 48 #include "content/common/pepper_messages.h" | 49 #include "content/common/pepper_messages.h" |
| 49 #include "content/common/site_isolation_policy.h" | 50 #include "content/common/site_isolation_policy.h" |
| 50 #include "content/common/ssl_status_serialization.h" | 51 #include "content/common/ssl_status_serialization.h" |
| (...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 671 params.opener_frame_route_id, &opener_view_routing_id); | 672 params.opener_frame_route_id, &opener_view_routing_id); |
| 672 if (opener_view_routing_id != MSG_ROUTING_NONE && was_created_by_renderer) | 673 if (opener_view_routing_id != MSG_ROUTING_NONE && was_created_by_renderer) |
| 673 opener_id_ = opener_view_routing_id; | 674 opener_id_ = opener_view_routing_id; |
| 674 | 675 |
| 675 display_mode_= params.initial_size.display_mode; | 676 display_mode_= params.initial_size.display_mode; |
| 676 | 677 |
| 677 // Ensure we start with a valid next_page_id_ from the browser. | 678 // Ensure we start with a valid next_page_id_ from the browser. |
| 678 DCHECK_GE(next_page_id_, 0); | 679 DCHECK_GE(next_page_id_, 0); |
| 679 | 680 |
| 680 webwidget_ = WebView::create(this); | 681 webwidget_ = WebView::create(this); |
| 682 if (IsUseZoomForDSFEnabled()) |
| 683 webview()->enableUseZoomForDeviceScaleFactor(); |
| 681 webwidget_mouse_lock_target_.reset(new WebWidgetLockTarget(webwidget_)); | 684 webwidget_mouse_lock_target_.reset(new WebWidgetLockTarget(webwidget_)); |
| 682 | 685 |
| 683 g_view_map.Get().insert(std::make_pair(webview(), this)); | 686 g_view_map.Get().insert(std::make_pair(webview(), this)); |
| 684 g_routing_id_view_map.Get().insert(std::make_pair(routing_id_, this)); | 687 g_routing_id_view_map.Get().insert(std::make_pair(routing_id_, this)); |
| 685 | 688 |
| 686 const base::CommandLine& command_line = | 689 const base::CommandLine& command_line = |
| 687 *base::CommandLine::ForCurrentProcess(); | 690 *base::CommandLine::ForCurrentProcess(); |
| 688 | 691 |
| 689 if (command_line.HasSwitch(switches::kStatsCollectionController)) | 692 if (command_line.HasSwitch(switches::kStatsCollectionController)) |
| 690 stats_collection_observer_.reset(new StatsCollectionObserver(this)); | 693 stats_collection_observer_.reset(new StatsCollectionObserver(this)); |
| (...skipping 2994 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3685 std::vector<gfx::Size> sizes; | 3688 std::vector<gfx::Size> sizes; |
| 3686 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); | 3689 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); |
| 3687 if (!url.isEmpty()) | 3690 if (!url.isEmpty()) |
| 3688 urls.push_back( | 3691 urls.push_back( |
| 3689 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); | 3692 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); |
| 3690 } | 3693 } |
| 3691 SendUpdateFaviconURL(urls); | 3694 SendUpdateFaviconURL(urls); |
| 3692 } | 3695 } |
| 3693 | 3696 |
| 3694 } // namespace content | 3697 } // namespace content |
| OLD | NEW |