OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
e-loading | 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
e-loading |
6 | 6 |
7 #include "content/browser/renderer_host/resource_dispatcher_host.h" | 7 #include "content/browser/renderer_host/resource_dispatcher_host.h" |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 #include "content/browser/renderer_host/resource_dispatcher_host_login_delegate.
h" | 44 #include "content/browser/renderer_host/resource_dispatcher_host_login_delegate.
h" |
45 #include "content/browser/renderer_host/resource_dispatcher_host_request_info.h" | 45 #include "content/browser/renderer_host/resource_dispatcher_host_request_info.h" |
46 #include "content/browser/renderer_host/resource_message_filter.h" | 46 #include "content/browser/renderer_host/resource_message_filter.h" |
47 #include "content/browser/renderer_host/resource_queue.h" | 47 #include "content/browser/renderer_host/resource_queue.h" |
48 #include "content/browser/renderer_host/resource_request_details.h" | 48 #include "content/browser/renderer_host/resource_request_details.h" |
49 #include "content/browser/renderer_host/sync_resource_handler.h" | 49 #include "content/browser/renderer_host/sync_resource_handler.h" |
50 #include "content/browser/resource_context.h" | 50 #include "content/browser/resource_context.h" |
51 #include "content/browser/ssl/ssl_client_auth_handler.h" | 51 #include "content/browser/ssl/ssl_client_auth_handler.h" |
52 #include "content/browser/ssl/ssl_manager.h" | 52 #include "content/browser/ssl/ssl_manager.h" |
53 #include "content/browser/worker_host/worker_service.h" | 53 #include "content/browser/worker_host/worker_service.h" |
54 #include "content/common/notification_service.h" | 54 #include "content/public/browser/notification_service.h" |
55 #include "content/common/resource_messages.h" | 55 #include "content/common/resource_messages.h" |
56 #include "content/common/view_messages.h" | 56 #include "content/common/view_messages.h" |
57 #include "content/public/browser/content_browser_client.h" | 57 #include "content/public/browser/content_browser_client.h" |
58 #include "content/public/common/content_switches.h" | 58 #include "content/public/common/content_switches.h" |
59 #include "content/public/common/url_constants.h" | 59 #include "content/public/common/url_constants.h" |
60 #include "net/base/auth.h" | 60 #include "net/base/auth.h" |
61 #include "net/base/cert_status_flags.h" | 61 #include "net/base/cert_status_flags.h" |
62 #include "net/base/cookie_monster.h" | 62 #include "net/base/cookie_monster.h" |
63 #include "net/base/load_flags.h" | 63 #include "net/base/load_flags.h" |
64 #include "net/base/mime_util.h" | 64 #include "net/base/mime_util.h" |
(...skipping 1832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1897 | 1897 |
1898 template <class T> | 1898 template <class T> |
1899 void ResourceDispatcherHost::NotifyOnUI(int type, | 1899 void ResourceDispatcherHost::NotifyOnUI(int type, |
1900 int render_process_id, | 1900 int render_process_id, |
1901 int render_view_id, | 1901 int render_view_id, |
1902 T* detail) { | 1902 T* detail) { |
1903 RenderViewHost* rvh = | 1903 RenderViewHost* rvh = |
1904 RenderViewHost::FromID(render_process_id, render_view_id); | 1904 RenderViewHost::FromID(render_process_id, render_view_id); |
1905 if (rvh) { | 1905 if (rvh) { |
1906 RenderViewHostDelegate* rvhd = rvh->delegate(); | 1906 RenderViewHostDelegate* rvhd = rvh->delegate(); |
1907 NotificationService::current()->Notify( | 1907 content::NotificationService::current()->Notify( |
1908 type, content::Source<RenderViewHostDelegate>(rvhd), | 1908 type, content::Source<RenderViewHostDelegate>(rvhd), |
1909 content::Details<T>(detail)); | 1909 content::Details<T>(detail)); |
1910 } | 1910 } |
1911 delete detail; | 1911 delete detail; |
1912 } | 1912 } |
1913 | 1913 |
1914 namespace { | 1914 namespace { |
1915 | 1915 |
1916 // This function attempts to return the "more interesting" load state of |a| | 1916 // This function attempts to return the "more interesting" load state of |a| |
1917 // and |b|. We don't have temporal information about these load states | 1917 // and |b|. We don't have temporal information about these load states |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2149 return HTTP_AUTH_RESOURCE_BLOCKED_CROSS; | 2149 return HTTP_AUTH_RESOURCE_BLOCKED_CROSS; |
2150 } | 2150 } |
2151 | 2151 |
2152 bool ResourceDispatcherHost::allow_cross_origin_auth_prompt() { | 2152 bool ResourceDispatcherHost::allow_cross_origin_auth_prompt() { |
2153 return allow_cross_origin_auth_prompt_; | 2153 return allow_cross_origin_auth_prompt_; |
2154 } | 2154 } |
2155 | 2155 |
2156 void ResourceDispatcherHost::set_allow_cross_origin_auth_prompt(bool value) { | 2156 void ResourceDispatcherHost::set_allow_cross_origin_auth_prompt(bool value) { |
2157 allow_cross_origin_auth_prompt_ = value; | 2157 allow_cross_origin_auth_prompt_ = value; |
2158 } | 2158 } |
OLD | NEW |