OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "chrome/browser/render_view_host.h" | 5 #include "chrome/browser/render_view_host.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
11 #include "chrome/app/result_codes.h" | 11 #include "chrome/app/result_codes.h" |
12 #include "chrome/browser/browser_process.h" | 12 #include "chrome/browser/browser_process.h" |
13 #include "chrome/browser/cross_site_request_manager.h" | 13 #include "chrome/browser/cross_site_request_manager.h" |
14 #include "chrome/browser/navigation_entry.h" | 14 #include "chrome/browser/navigation_entry.h" |
15 #include "chrome/browser/profile.h" | 15 #include "chrome/browser/profile.h" |
16 #include "chrome/browser/render_process_host.h" | 16 #include "chrome/browser/render_process_host.h" |
17 #include "chrome/browser/render_widget_host.h" | 17 #include "chrome/browser/render_widget_host.h" |
18 #include "chrome/browser/render_widget_host_view.h" | 18 #include "chrome/browser/render_widget_host_view.h" |
19 #include "chrome/browser/render_view_host_delegate.h" | 19 #include "chrome/browser/render_view_host_delegate.h" |
20 #include "chrome/browser/renderer_security_policy.h" | 20 #include "chrome/browser/renderer_security_policy.h" |
21 #include "chrome/browser/debugger/debugger_wrapper.h" | 21 #include "chrome/browser/debugger/debugger_wrapper.h" |
22 #include "chrome/browser/site_instance.h" | 22 #include "chrome/browser/site_instance.h" |
23 #include "chrome/browser/user_metrics.h" | 23 #include "chrome/browser/user_metrics.h" |
24 #include "chrome/browser/web_contents.h" | 24 #include "chrome/browser/web_contents.h" |
25 #include "chrome/common/resource_bundle.h" | 25 #include "chrome/common/resource_bundle.h" |
26 #include "chrome/common/thumbnail_score.h" | 26 #include "chrome/common/thumbnail_score.h" |
27 #include "net/base/net_util.h" | 27 #include "net/base/net_util.h" |
28 #include "skia/include/SkBitmap.h" | 28 #include "skia/include/SkBitmap.h" |
29 | 29 |
| 30 using base::TimeDelta; |
| 31 |
30 namespace { | 32 namespace { |
31 | 33 |
32 void FilterURL(RendererSecurityPolicy* policy, int renderer_id, GURL* url) { | 34 void FilterURL(RendererSecurityPolicy* policy, int renderer_id, GURL* url) { |
33 if (!url->is_valid()) | 35 if (!url->is_valid()) |
34 return; // We don't need to block invalid URLs. | 36 return; // We don't need to block invalid URLs. |
35 | 37 |
36 if (url->SchemeIs("about")) { | 38 if (url->SchemeIs("about")) { |
37 // The renderer treats all URLs in the about: scheme as being about:blank. | 39 // The renderer treats all URLs in the about: scheme as being about:blank. |
38 // Canonicalize about: URLs to about:blank. | 40 // Canonicalize about: URLs to about:blank. |
39 *url = GURL("about:blank"); | 41 *url = GURL("about:blank"); |
(...skipping 1195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1235 Send(new ViewMsg_PersonalizationEvent(routing_id_, | 1237 Send(new ViewMsg_PersonalizationEvent(routing_id_, |
1236 event_name, | 1238 event_name, |
1237 event_arg)); | 1239 event_arg)); |
1238 } | 1240 } |
1239 #endif | 1241 #endif |
1240 | 1242 |
1241 void RenderViewHost::ForwardMessageFromExternalHost( | 1243 void RenderViewHost::ForwardMessageFromExternalHost( |
1242 const std::string& target, const std::string& message) { | 1244 const std::string& target, const std::string& message) { |
1243 Send(new ViewMsg_HandleMessageFromExternalHost(routing_id_, target, message)); | 1245 Send(new ViewMsg_HandleMessageFromExternalHost(routing_id_, target, message)); |
1244 } | 1246 } |
OLD | NEW |