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

Side by Side Diff: ios/web/public/web_client.h

Issue 1996723002: Switch ResourceBundle LoadDataResourceBytes to return RefCountedMemory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update to address newly added use Created 4 years, 6 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
« no previous file with comments | « ios/web/public/test/test_web_client.mm ('k') | ios/web/public/web_client.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 IOS_WEB_PUBLIC_WEB_CLIENT_H_ 5 #ifndef IOS_WEB_PUBLIC_WEB_CLIENT_H_
6 #define IOS_WEB_PUBLIC_WEB_CLIENT_H_ 6 #define IOS_WEB_PUBLIC_WEB_CLIENT_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/strings/string16.h" 12 #include "base/strings/string16.h"
13 #include "base/strings/string_piece.h" 13 #include "base/strings/string_piece.h"
14 #include "ui/base/layout.h" 14 #include "ui/base/layout.h"
15 #include "url/url_util.h" 15 #include "url/url_util.h"
16 16
17 namespace base { 17 namespace base {
18 class RefCountedStaticMemory; 18 class RefCountedMemory;
19 } 19 }
20 20
21 class GURL; 21 class GURL;
22 22
23 @class UIWebView; 23 @class UIWebView;
24 @class NSString; 24 @class NSString;
25 25
26 namespace net { 26 namespace net {
27 class SSLInfo; 27 class SSLInfo;
28 } 28 }
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 virtual std::string GetUserAgent(bool desktop_user_agent) const; 94 virtual std::string GetUserAgent(bool desktop_user_agent) const;
95 95
96 // Returns a string resource given its id. 96 // Returns a string resource given its id.
97 virtual base::string16 GetLocalizedString(int message_id) const; 97 virtual base::string16 GetLocalizedString(int message_id) const;
98 98
99 // Returns the contents of a resource in a StringPiece given the resource id. 99 // Returns the contents of a resource in a StringPiece given the resource id.
100 virtual base::StringPiece GetDataResource(int resource_id, 100 virtual base::StringPiece GetDataResource(int resource_id,
101 ui::ScaleFactor scale_factor) const; 101 ui::ScaleFactor scale_factor) const;
102 102
103 // Returns the raw bytes of a scale independent data resource. 103 // Returns the raw bytes of a scale independent data resource.
104 virtual base::RefCountedStaticMemory* GetDataResourceBytes( 104 virtual base::RefCountedMemory* GetDataResourceBytes(int resource_id) const;
105 int resource_id) const;
106 105
107 // Returns a list of additional WebUI schemes, if any. These additional 106 // Returns a list of additional WebUI schemes, if any. These additional
108 // schemes act as aliases to the about: scheme. The additional schemes may or 107 // schemes act as aliases to the about: scheme. The additional schemes may or
109 // may not serve specific WebUI pages depending on the particular 108 // may not serve specific WebUI pages depending on the particular
110 // URLDataSourceIOS and its override of 109 // URLDataSourceIOS and its override of
111 // URLDataSourceIOS::ShouldServiceRequest. For all schemes returned here, 110 // URLDataSourceIOS::ShouldServiceRequest. For all schemes returned here,
112 // view-source is allowed. 111 // view-source is allowed.
113 virtual void GetAdditionalWebUISchemes( 112 virtual void GetAdditionalWebUISchemes(
114 std::vector<std::string>* additional_schemes) {} 113 std::vector<std::string>* additional_schemes) {}
115 114
(...skipping 14 matching lines...) Expand all
130 int cert_error, 129 int cert_error,
131 const net::SSLInfo& ssl_info, 130 const net::SSLInfo& ssl_info,
132 const GURL& request_url, 131 const GURL& request_url,
133 bool overridable, 132 bool overridable,
134 const base::Callback<void(bool)>& callback); 133 const base::Callback<void(bool)>& callback);
135 }; 134 };
136 135
137 } // namespace web 136 } // namespace web
138 137
139 #endif // IOS_WEB_PUBLIC_WEB_CLIENT_H_ 138 #endif // IOS_WEB_PUBLIC_WEB_CLIENT_H_
OLDNEW
« no previous file with comments | « ios/web/public/test/test_web_client.mm ('k') | ios/web/public/web_client.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698