Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Side by Side Diff: content/browser/renderer_host/resource_dispatcher_host.h

Issue 7327007: Moving notification types which are chrome specific to a new header file chrome_notification_type... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 // This is the browser side of the resource dispatcher, it receives requests 5 // This is the browser side of the resource dispatcher, it receives requests
6 // from the child process (i.e. [Renderer, Plugin, Worker]ProcessHost), and 6 // from the child process (i.e. [Renderer, Plugin, Worker]ProcessHost), and
7 // dispatches them to URLRequests. It then forwards the messages from the 7 // dispatches them to URLRequests. It then forwards the messages from the
8 // URLRequests back to the correct process for handling. 8 // URLRequests back to the correct process for handling.
9 // 9 //
10 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading 10 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc e-loading
11 11
12 #ifndef CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_ 12 #ifndef CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_
13 #define CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_ 13 #define CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_
14 #pragma once 14 #pragma once
15 15
16 #include <map> 16 #include <map>
17 #include <string> 17 #include <string>
18 #include <vector> 18 #include <vector>
19 19
20 #include "base/basictypes.h" 20 #include "base/basictypes.h"
21 #include "base/gtest_prod_util.h" 21 #include "base/gtest_prod_util.h"
22 #include "base/memory/scoped_ptr.h" 22 #include "base/memory/scoped_ptr.h"
23 #include "base/timer.h" 23 #include "base/timer.h"
24 #include "content/browser/renderer_host/resource_queue.h" 24 #include "content/browser/renderer_host/resource_queue.h"
25 #include "content/common/child_process_info.h" 25 #include "content/common/child_process_info.h"
26 #include "content/common/notification_type.h" 26 #include "content/common/content_notification_types.h"
27 #include "ipc/ipc_message.h" 27 #include "ipc/ipc_message.h"
28 #include "net/url_request/url_request.h" 28 #include "net/url_request/url_request.h"
29 #include "webkit/glue/resource_type.h" 29 #include "webkit/glue/resource_type.h"
30 30
31 class CrossSiteResourceHandler; 31 class CrossSiteResourceHandler;
32 class DownloadFileManager; 32 class DownloadFileManager;
33 class DownloadRequestLimiter; 33 class DownloadRequestLimiter;
34 class LoginHandler; 34 class LoginHandler;
35 class NotificationDetails; 35 class NotificationDetails;
36 class PluginService; 36 class PluginService;
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 bool IsValidRequest(net::URLRequest* request); 400 bool IsValidRequest(net::URLRequest* request);
401 401
402 // Determine request priority based on how critical this resource typically 402 // Determine request priority based on how critical this resource typically
403 // is to user-perceived page load performance. 403 // is to user-perceived page load performance.
404 static net::RequestPriority DetermineRequestPriority(ResourceType::Type type, 404 static net::RequestPriority DetermineRequestPriority(ResourceType::Type type,
405 int load_flags); 405 int load_flags);
406 406
407 // Sends the given notification on the UI thread. The RenderViewHost's 407 // Sends the given notification on the UI thread. The RenderViewHost's
408 // controller is used as the source. 408 // controller is used as the source.
409 template <class T> 409 template <class T>
410 static void NotifyOnUI(NotificationType type, 410 static void NotifyOnUI(int type,
411 int render_process_id, 411 int render_process_id,
412 int render_view_id, 412 int render_view_id,
413 T* detail); 413 T* detail);
414 414
415 // Relationship of resource being authenticated with the top level page. 415 // Relationship of resource being authenticated with the top level page.
416 enum HttpAuthResourceType { 416 enum HttpAuthResourceType {
417 HTTP_AUTH_RESOURCE_TOP, // Top-level page itself 417 HTTP_AUTH_RESOURCE_TOP, // Top-level page itself
418 HTTP_AUTH_RESOURCE_SAME_DOMAIN, // Sub-content from same domain 418 HTTP_AUTH_RESOURCE_SAME_DOMAIN, // Sub-content from same domain
419 HTTP_AUTH_RESOURCE_BLOCKED_CROSS, // Blocked Sub-content from cross domain 419 HTTP_AUTH_RESOURCE_BLOCKED_CROSS, // Blocked Sub-content from cross domain
420 HTTP_AUTH_RESOURCE_ALLOWED_CROSS, // Allowed Sub-content per command line 420 HTTP_AUTH_RESOURCE_ALLOWED_CROSS, // Allowed Sub-content per command line
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 493
494 ResourceDispatcherHostDelegate* delegate_; 494 ResourceDispatcherHostDelegate* delegate_;
495 495
496 static bool is_prefetch_enabled_; 496 static bool is_prefetch_enabled_;
497 bool allow_cross_origin_auth_prompt_; 497 bool allow_cross_origin_auth_prompt_;
498 498
499 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHost); 499 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHost);
500 }; 500 };
501 501
502 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_ 502 #endif // CONTENT_BROWSER_RENDERER_HOST_RESOURCE_DISPATCHER_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698