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

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

Issue 14039004: Add int params to URLDataSource::StartDataRequest(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changing struct -> ints. Created 7 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_URL_DATA_SOURCE_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_URL_DATA_SOURCE_H_
6 #define CONTENT_PUBLIC_BROWSER_URL_DATA_SOURCE_H_ 6 #define CONTENT_PUBLIC_BROWSER_URL_DATA_SOURCE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 30 matching lines...) Expand all
41 41
42 // Used by StartDataRequest so that the child class can return the data when 42 // Used by StartDataRequest so that the child class can return the data when
43 // it's available. 43 // it's available.
44 typedef base::Callback<void(base::RefCountedMemory*)> GotDataCallback; 44 typedef base::Callback<void(base::RefCountedMemory*)> GotDataCallback;
45 45
46 // Called by URLDataSource to request data at |path|. The string parameter is 46 // Called by URLDataSource to request data at |path|. The string parameter is
47 // the path of the request. The child class should run |callback| when the 47 // the path of the request. The child class should run |callback| when the
48 // data is available or if the request could not be satisfied. This can be 48 // data is available or if the request could not be satisfied. This can be
49 // called either in this callback or asynchronously with the response. 49 // called either in this callback or asynchronously with the response.
50 virtual void StartDataRequest(const std::string& path, 50 virtual void StartDataRequest(const std::string& path,
51 bool is_incognito, 51 int render_process_id,
52 int render_view_id,
52 const GotDataCallback& callback) = 0; 53 const GotDataCallback& callback) = 0;
53 54
54 // Return the mimetype that should be sent with this response, or empty 55 // Return the mimetype that should be sent with this response, or empty
55 // string to specify no mime type. 56 // string to specify no mime type.
56 virtual std::string GetMimeType(const std::string& path) const = 0; 57 virtual std::string GetMimeType(const std::string& path) const = 0;
57 58
58 // The following methods are all called on the IO thread. 59 // The following methods are all called on the IO thread.
59 60
60 // Returns the MessageLoop on which the delegate wishes to have 61 // Returns the MessageLoop on which the delegate wishes to have
61 // StartDataRequest called to handle the request for |path|. The default 62 // StartDataRequest called to handle the request for |path|. The default
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 // Override in specific WebUI data sources to enable for additional schemes or 105 // Override in specific WebUI data sources to enable for additional schemes or
105 // to implement fancier access control. Typically used in concert with 106 // to implement fancier access control. Typically used in concert with
106 // ContentBrowserClient::GetAdditionalWebUISchemes() to permit additional 107 // ContentBrowserClient::GetAdditionalWebUISchemes() to permit additional
107 // WebUI scheme support for an embedder. 108 // WebUI scheme support for an embedder.
108 virtual bool ShouldServiceRequest(const net::URLRequest* request) const; 109 virtual bool ShouldServiceRequest(const net::URLRequest* request) const;
109 }; 110 };
110 111
111 } // namespace content 112 } // namespace content
112 113
113 #endif // CONTENT_PUBLIC_BROWSER_URL_DATA_SOURCE_H_ 114 #endif // CONTENT_PUBLIC_BROWSER_URL_DATA_SOURCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698