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

Side by Side Diff: content/public/browser/resource_dispatcher_host_delegate.h

Issue 131783012: Fix the handling of user gestures for external protocol handler dialogs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove unnecessary DCHECK Created 6 years, 8 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) 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"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 ScopedVector<ResourceThrottle>* throttles); 77 ScopedVector<ResourceThrottle>* throttles);
78 78
79 // Creates a ResourceDispatcherHostLoginDelegate that asks the user for a 79 // Creates a ResourceDispatcherHostLoginDelegate that asks the user for a
80 // username and password. 80 // username and password.
81 virtual ResourceDispatcherHostLoginDelegate* CreateLoginDelegate( 81 virtual ResourceDispatcherHostLoginDelegate* CreateLoginDelegate(
82 net::AuthChallengeInfo* auth_info, net::URLRequest* request); 82 net::AuthChallengeInfo* auth_info, net::URLRequest* request);
83 83
84 // Launches the url for the given tab. Returns true if an attempt to handle 84 // Launches the url for the given tab. Returns true if an attempt to handle
85 // the url was made, e.g. by launching an app. Note that this does not 85 // the url was made, e.g. by launching an app. Note that this does not
86 // guarantee that the app successfully handled it. 86 // guarantee that the app successfully handled it.
87 // Some external protocol handlers only run in the context of a user gesture,
88 // so initiated_by_user_gesture should be passed accordingly.
87 virtual bool HandleExternalProtocol(const GURL& url, 89 virtual bool HandleExternalProtocol(const GURL& url,
88 int child_id, 90 int child_id,
89 int route_id); 91 int route_id,
92 bool initiated_by_user_gesture);
90 93
91 // Returns true if we should force the given resource to be downloaded. 94 // Returns true if we should force the given resource to be downloaded.
92 // Otherwise, the content layer decides. 95 // Otherwise, the content layer decides.
93 virtual bool ShouldForceDownloadResource( 96 virtual bool ShouldForceDownloadResource(
94 const GURL& url, const std::string& mime_type); 97 const GURL& url, const std::string& mime_type);
95 98
96 // Returns true and sets |origin| and |target_id| if a Stream should be 99 // Returns true and sets |origin| and |target_id| if a Stream should be
97 // created for the resource. 100 // created for the resource.
98 // If true is returned, a new Stream will be created and OnStreamCreated() 101 // If true is returned, a new Stream will be created and OnStreamCreated()
99 // will be called with 102 // will be called with
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 virtual void RequestComplete(net::URLRequest* url_request); 141 virtual void RequestComplete(net::URLRequest* url_request);
139 142
140 protected: 143 protected:
141 ResourceDispatcherHostDelegate(); 144 ResourceDispatcherHostDelegate();
142 virtual ~ResourceDispatcherHostDelegate(); 145 virtual ~ResourceDispatcherHostDelegate();
143 }; 146 };
144 147
145 } // namespace content 148 } // namespace content
146 149
147 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_ 150 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_DISPATCHER_HOST_DELEGATE_H_
OLDNEW
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_impl.cc ('k') | content/public/browser/resource_dispatcher_host_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698