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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 #include "ui/gfx/point.h" | 191 #include "ui/gfx/point.h" |
192 #include "ui/gfx/rect.h" | 192 #include "ui/gfx/rect.h" |
193 #include "ui/gfx/rect_conversions.h" | 193 #include "ui/gfx/rect_conversions.h" |
194 #include "ui/gfx/size_conversions.h" | 194 #include "ui/gfx/size_conversions.h" |
195 #include "ui/shell_dialogs/selected_file_info.h" | 195 #include "ui/shell_dialogs/selected_file_info.h" |
196 #include "v8/include/v8.h" | 196 #include "v8/include/v8.h" |
197 | 197 |
198 #if defined(OS_ANDROID) | 198 #if defined(OS_ANDROID) |
199 #include <cpu-features.h> | 199 #include <cpu-features.h> |
200 | 200 |
| 201 #include "base/android/library_loader/library_loader_hooks.h" |
201 #include "content/renderer/android/address_detector.h" | 202 #include "content/renderer/android/address_detector.h" |
202 #include "content/renderer/android/content_detector.h" | 203 #include "content/renderer/android/content_detector.h" |
203 #include "content/renderer/android/email_detector.h" | 204 #include "content/renderer/android/email_detector.h" |
204 #include "content/renderer/android/phone_number_detector.h" | 205 #include "content/renderer/android/phone_number_detector.h" |
205 #include "net/android/network_library.h" | 206 #include "net/android/network_library.h" |
206 #include "third_party/WebKit/public/platform/WebFloatPoint.h" | 207 #include "third_party/WebKit/public/platform/WebFloatPoint.h" |
207 #include "third_party/WebKit/public/platform/WebFloatRect.h" | 208 #include "third_party/WebKit/public/platform/WebFloatRect.h" |
208 #include "ui/gfx/rect_f.h" | 209 #include "ui/gfx/rect_f.h" |
209 | 210 |
210 #elif defined(OS_WIN) | 211 #elif defined(OS_WIN) |
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
816 | 817 |
817 new IdleUserDetector(this); | 818 new IdleUserDetector(this); |
818 | 819 |
819 if (command_line.HasSwitch(switches::kDomAutomationController)) | 820 if (command_line.HasSwitch(switches::kDomAutomationController)) |
820 enabled_bindings_ |= BINDINGS_POLICY_DOM_AUTOMATION; | 821 enabled_bindings_ |= BINDINGS_POLICY_DOM_AUTOMATION; |
821 if (command_line.HasSwitch(switches::kStatsCollectionController)) | 822 if (command_line.HasSwitch(switches::kStatsCollectionController)) |
822 enabled_bindings_ |= BINDINGS_POLICY_STATS_COLLECTION; | 823 enabled_bindings_ |= BINDINGS_POLICY_STATS_COLLECTION; |
823 | 824 |
824 ProcessViewLayoutFlags(command_line); | 825 ProcessViewLayoutFlags(command_line); |
825 | 826 |
| 827 #if defined(OS_ANDROID) |
| 828 // If we have a pending chromium android linker histogram, record it. |
| 829 base::android::RecordChromiumAndroidLinkerRendererHistogram(); |
| 830 #endif |
| 831 |
826 GetContentClient()->renderer()->RenderViewCreated(this); | 832 GetContentClient()->renderer()->RenderViewCreated(this); |
827 | 833 |
828 // If we have an opener_id but we weren't created by a renderer, then | 834 // If we have an opener_id but we weren't created by a renderer, then |
829 // it's the browser asking us to set our opener to another RenderView. | 835 // it's the browser asking us to set our opener to another RenderView. |
830 if (params->opener_id != MSG_ROUTING_NONE && !params->is_renderer_created) { | 836 if (params->opener_id != MSG_ROUTING_NONE && !params->is_renderer_created) { |
831 RenderViewImpl* opener_view = FromRoutingID(params->opener_id); | 837 RenderViewImpl* opener_view = FromRoutingID(params->opener_id); |
832 if (opener_view) | 838 if (opener_view) |
833 webview()->mainFrame()->setOpener(opener_view->webview()->mainFrame()); | 839 webview()->mainFrame()->setOpener(opener_view->webview()->mainFrame()); |
834 } | 840 } |
835 | 841 |
(...skipping 3348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4184 std::vector<gfx::Size> sizes; | 4190 std::vector<gfx::Size> sizes; |
4185 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); | 4191 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); |
4186 if (!url.isEmpty()) | 4192 if (!url.isEmpty()) |
4187 urls.push_back( | 4193 urls.push_back( |
4188 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); | 4194 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); |
4189 } | 4195 } |
4190 SendUpdateFaviconURL(urls); | 4196 SendUpdateFaviconURL(urls); |
4191 } | 4197 } |
4192 | 4198 |
4193 } // namespace content | 4199 } // namespace content |
OLD | NEW |