| 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 #ifndef CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ | 6 #define CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
| 13 #include "content/public/common/resource_type.h" | 13 #include "content/public/common/resource_type.h" |
| 14 #include "ui/base/page_transition_types.h" |
| 14 | 15 |
| 15 class GURL; | 16 class GURL; |
| 16 template <class T> class ScopedVector; | 17 template <class T> class ScopedVector; |
| 17 | 18 |
| 18 namespace IPC { | 19 namespace IPC { |
| 19 class Sender; | 20 class Sender; |
| 20 } | 21 } |
| 21 | 22 |
| 22 namespace net { | 23 namespace net { |
| 23 class AuthChallengeInfo; | 24 class AuthChallengeInfo; |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 // username and password. | 68 // username and password. |
| 68 virtual ResourceDispatcherHostLoginDelegate* CreateLoginDelegate( | 69 virtual ResourceDispatcherHostLoginDelegate* CreateLoginDelegate( |
| 69 net::AuthChallengeInfo* auth_info, | 70 net::AuthChallengeInfo* auth_info, |
| 70 net::URLRequest* request); | 71 net::URLRequest* request); |
| 71 | 72 |
| 72 // Launches the url for the given tab. Returns true if an attempt to handle | 73 // Launches the url for the given tab. Returns true if an attempt to handle |
| 73 // the url was made, e.g. by launching an app. Note that this does not | 74 // the url was made, e.g. by launching an app. Note that this does not |
| 74 // guarantee that the app successfully handled it. | 75 // guarantee that the app successfully handled it. |
| 75 virtual bool HandleExternalProtocol(const GURL& url, | 76 virtual bool HandleExternalProtocol(const GURL& url, |
| 76 int child_id, | 77 int child_id, |
| 77 int route_id); | 78 int route_id, |
| 79 bool is_main_frame, |
| 80 ui::PageTransition page_transition, |
| 81 bool has_user_gesture); |
| 78 | 82 |
| 79 // Returns true if we should force the given resource to be downloaded. | 83 // Returns true if we should force the given resource to be downloaded. |
| 80 // Otherwise, the content layer decides. | 84 // Otherwise, the content layer decides. |
| 81 virtual bool ShouldForceDownloadResource(const GURL& url, | 85 virtual bool ShouldForceDownloadResource(const GURL& url, |
| 82 const std::string& mime_type); | 86 const std::string& mime_type); |
| 83 | 87 |
| 84 // Returns true and sets |origin| if a Stream should be created for the | 88 // Returns true and sets |origin| if a Stream should be created for the |
| 85 // resource. | 89 // resource. |
| 86 // If true is returned, a new Stream will be created and OnStreamCreated() | 90 // If true is returned, a new Stream will be created and OnStreamCreated() |
| 87 // will be called with | 91 // will be called with |
| (...skipping 30 matching lines...) Expand all Loading... |
| 118 virtual void RequestComplete(net::URLRequest* url_request); | 122 virtual void RequestComplete(net::URLRequest* url_request); |
| 119 | 123 |
| 120 protected: | 124 protected: |
| 121 ResourceDispatcherHostDelegate(); | 125 ResourceDispatcherHostDelegate(); |
| 122 virtual ~ResourceDispatcherHostDelegate(); | 126 virtual ~ResourceDispatcherHostDelegate(); |
| 123 }; | 127 }; |
| 124 | 128 |
| 125 } // namespace content | 129 } // namespace content |
| 126 | 130 |
| 127 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ | 131 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ |
| OLD | NEW |