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