| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 #include "third_party/WebKit/public/platform/WebStorageQuotaCallbacks.h" | 132 #include "third_party/WebKit/public/platform/WebStorageQuotaCallbacks.h" |
| 133 #include "third_party/WebKit/public/platform/WebString.h" | 133 #include "third_party/WebKit/public/platform/WebString.h" |
| 134 #include "third_party/WebKit/public/platform/WebURL.h" | 134 #include "third_party/WebKit/public/platform/WebURL.h" |
| 135 #include "third_party/WebKit/public/platform/WebURLError.h" | 135 #include "third_party/WebKit/public/platform/WebURLError.h" |
| 136 #include "third_party/WebKit/public/platform/WebURLResponse.h" | 136 #include "third_party/WebKit/public/platform/WebURLResponse.h" |
| 137 #include "third_party/WebKit/public/platform/WebVector.h" | 137 #include "third_party/WebKit/public/platform/WebVector.h" |
| 138 #include "third_party/WebKit/public/platform/modules/webusb/WebUSBClient.h" | 138 #include "third_party/WebKit/public/platform/modules/webusb/WebUSBClient.h" |
| 139 #include "third_party/WebKit/public/web/WebColorSuggestion.h" | 139 #include "third_party/WebKit/public/web/WebColorSuggestion.h" |
| 140 #include "third_party/WebKit/public/web/WebDocument.h" | 140 #include "third_party/WebKit/public/web/WebDocument.h" |
| 141 #include "third_party/WebKit/public/web/WebFrameWidget.h" | 141 #include "third_party/WebKit/public/web/WebFrameWidget.h" |
| 142 #include "third_party/WebKit/public/web/WebGlyphCache.h" | |
| 143 #include "third_party/WebKit/public/web/WebKit.h" | 142 #include "third_party/WebKit/public/web/WebKit.h" |
| 144 #include "third_party/WebKit/public/web/WebLocalFrame.h" | 143 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
| 145 #include "third_party/WebKit/public/web/WebMediaStreamRegistry.h" | 144 #include "third_party/WebKit/public/web/WebMediaStreamRegistry.h" |
| 146 #include "third_party/WebKit/public/web/WebNavigationPolicy.h" | 145 #include "third_party/WebKit/public/web/WebNavigationPolicy.h" |
| 147 #include "third_party/WebKit/public/web/WebPageSerializer.h" | 146 #include "third_party/WebKit/public/web/WebPageSerializer.h" |
| 148 #include "third_party/WebKit/public/web/WebPlugin.h" | 147 #include "third_party/WebKit/public/web/WebPlugin.h" |
| 149 #include "third_party/WebKit/public/web/WebPluginParams.h" | 148 #include "third_party/WebKit/public/web/WebPluginParams.h" |
| 150 #include "third_party/WebKit/public/web/WebRange.h" | 149 #include "third_party/WebKit/public/web/WebRange.h" |
| 151 #include "third_party/WebKit/public/web/WebScopedUserGesture.h" | 150 #include "third_party/WebKit/public/web/WebScopedUserGesture.h" |
| 152 #include "third_party/WebKit/public/web/WebScriptSource.h" | 151 #include "third_party/WebKit/public/web/WebScriptSource.h" |
| (...skipping 4085 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4238 params.original_request_url = GetOriginalRequestURL(ds); | 4237 params.original_request_url = GetOriginalRequestURL(ds); |
| 4239 | 4238 |
| 4240 params.history_list_was_cleared = | 4239 params.history_list_was_cleared = |
| 4241 navigation_state->request_params().should_clear_history_list; | 4240 navigation_state->request_params().should_clear_history_list; |
| 4242 | 4241 |
| 4243 params.report_type = static_cast<FrameMsg_UILoadMetricsReportType::Value>( | 4242 params.report_type = static_cast<FrameMsg_UILoadMetricsReportType::Value>( |
| 4244 frame->dataSource()->request().inputPerfMetricReportPolicy()); | 4243 frame->dataSource()->request().inputPerfMetricReportPolicy()); |
| 4245 params.ui_timestamp = base::TimeTicks() + base::TimeDelta::FromSecondsD( | 4244 params.ui_timestamp = base::TimeTicks() + base::TimeDelta::FromSecondsD( |
| 4246 frame->dataSource()->request().uiStartTime()); | 4245 frame->dataSource()->request().uiStartTime()); |
| 4247 | 4246 |
| 4248 // Save some histogram data so we can compute the average memory used per | |
| 4249 // page load of the glyphs. | |
| 4250 UMA_HISTOGRAM_COUNTS_10000("Memory.GlyphPagesPerLoad", | |
| 4251 blink::WebGlyphCache::pageCount()); | |
| 4252 | |
| 4253 // This message needs to be sent before any of allowScripts(), | 4247 // This message needs to be sent before any of allowScripts(), |
| 4254 // allowImages(), allowPlugins() is called for the new page, so that when | 4248 // allowImages(), allowPlugins() is called for the new page, so that when |
| 4255 // these functions send a ViewHostMsg_ContentBlocked message, it arrives | 4249 // these functions send a ViewHostMsg_ContentBlocked message, it arrives |
| 4256 // after the FrameHostMsg_DidCommitProvisionalLoad message. | 4250 // after the FrameHostMsg_DidCommitProvisionalLoad message. |
| 4257 Send(new FrameHostMsg_DidCommitProvisionalLoad(routing_id_, params)); | 4251 Send(new FrameHostMsg_DidCommitProvisionalLoad(routing_id_, params)); |
| 4258 } else { | 4252 } else { |
| 4259 // Subframe navigation: the type depends on whether this navigation | 4253 // Subframe navigation: the type depends on whether this navigation |
| 4260 // generated a new session history entry. When they do generate a session | 4254 // generated a new session history entry. When they do generate a session |
| 4261 // history entry, it means the user initiated the navigation and we should | 4255 // history entry, it means the user initiated the navigation and we should |
| 4262 // mark it as such. | 4256 // mark it as such. |
| (...skipping 1097 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5360 media::ConvertToSwitchOutputDeviceCB(web_callbacks); | 5354 media::ConvertToSwitchOutputDeviceCB(web_callbacks); |
| 5361 scoped_refptr<media::AudioOutputDevice> device = | 5355 scoped_refptr<media::AudioOutputDevice> device = |
| 5362 AudioDeviceFactory::NewOutputDevice(routing_id_, 0, sink_id.utf8(), | 5356 AudioDeviceFactory::NewOutputDevice(routing_id_, 0, sink_id.utf8(), |
| 5363 security_origin); | 5357 security_origin); |
| 5364 media::OutputDeviceStatus status = device->GetDeviceStatus(); | 5358 media::OutputDeviceStatus status = device->GetDeviceStatus(); |
| 5365 device->Stop(); | 5359 device->Stop(); |
| 5366 callback.Run(status); | 5360 callback.Run(status); |
| 5367 } | 5361 } |
| 5368 | 5362 |
| 5369 } // namespace content | 5363 } // namespace content |
| OLD | NEW |