| 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/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 | 73 |
| 74 // Launches the url for the given tab. Returns true if an attempt to handle | 74 // Launches the url for the given tab. Returns true if an attempt to handle |
| 75 // the url was made, e.g. by launching an app. Note that this does not | 75 // the url was made, e.g. by launching an app. Note that this does not |
| 76 // guarantee that the app successfully handled it. | 76 // guarantee that the app successfully handled it. |
| 77 virtual bool HandleExternalProtocol( | 77 virtual bool HandleExternalProtocol( |
| 78 const GURL& url, | 78 const GURL& url, |
| 79 int child_id, | 79 int child_id, |
| 80 const ResourceRequestInfo::WebContentsGetter& web_contents_getter, | 80 const ResourceRequestInfo::WebContentsGetter& web_contents_getter, |
| 81 bool is_main_frame, | 81 bool is_main_frame, |
| 82 ui::PageTransition page_transition, | 82 ui::PageTransition page_transition, |
| 83 bool has_user_gesture); | 83 bool has_user_gesture, |
| 84 bool is_whitelist); |
| 84 | 85 |
| 85 // Returns true if we should force the given resource to be downloaded. | 86 // Returns true if we should force the given resource to be downloaded. |
| 86 // Otherwise, the content layer decides. | 87 // Otherwise, the content layer decides. |
| 87 virtual bool ShouldForceDownloadResource(const GURL& url, | 88 virtual bool ShouldForceDownloadResource(const GURL& url, |
| 88 const std::string& mime_type); | 89 const std::string& mime_type); |
| 89 | 90 |
| 90 // Returns true and sets |origin| if a Stream should be created for the | 91 // Returns true and sets |origin| if a Stream should be created for the |
| 91 // resource. |plugin_path| is the plugin which will be used to handle the | 92 // resource. |plugin_path| is the plugin which will be used to handle the |
| 92 // request (if the stream will be rendered in a BrowserPlugin). It may be | 93 // request (if the stream will be rendered in a BrowserPlugin). It may be |
| 93 // empty. If true is returned, a new Stream will be created and | 94 // empty. If true is returned, a new Stream will be created and |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 content::ResourceContext* resource_context); | 132 content::ResourceContext* resource_context); |
| 132 | 133 |
| 133 protected: | 134 protected: |
| 134 ResourceDispatcherHostDelegate(); | 135 ResourceDispatcherHostDelegate(); |
| 135 virtual ~ResourceDispatcherHostDelegate(); | 136 virtual ~ResourceDispatcherHostDelegate(); |
| 136 }; | 137 }; |
| 137 | 138 |
| 138 } // namespace content | 139 } // namespace content |
| 139 | 140 |
| 140 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ | 141 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ |
| OLD | NEW |