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

Side by Side Diff: content/public/common/content_client.h

Issue 1401813002: Cache User Agent string in BlinkPlatformImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: +comment. +DCHECK Created 5 years, 1 month 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 | « content/child/blink_platform_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_COMMON_CONTENT_CLIENT_H_ 5 #ifndef CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_
6 #define CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ 6 #define CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 std::vector<std::string>* savable_schemes) {} 94 std::vector<std::string>* savable_schemes) {}
95 95
96 // Returns whether the given message should be sent in a swapped out renderer. 96 // Returns whether the given message should be sent in a swapped out renderer.
97 virtual bool CanSendWhileSwappedOut(const IPC::Message* message); 97 virtual bool CanSendWhileSwappedOut(const IPC::Message* message);
98 98
99 // Returns a string describing the embedder product name and version, 99 // Returns a string describing the embedder product name and version,
100 // of the form "productname/version", with no other slashes. 100 // of the form "productname/version", with no other slashes.
101 // Used as part of the user agent string. 101 // Used as part of the user agent string.
102 virtual std::string GetProduct() const; 102 virtual std::string GetProduct() const;
103 103
104 // Returns the user agent. 104 // Returns the user agent. Content may cache this value.
105 virtual std::string GetUserAgent() const; 105 virtual std::string GetUserAgent() const;
106 106
107 // Returns a string resource given its id. 107 // Returns a string resource given its id.
108 virtual base::string16 GetLocalizedString(int message_id) const; 108 virtual base::string16 GetLocalizedString(int message_id) const;
109 109
110 // Return the contents of a resource in a StringPiece given the resource id. 110 // Return the contents of a resource in a StringPiece given the resource id.
111 virtual base::StringPiece GetDataResource( 111 virtual base::StringPiece GetDataResource(
112 int resource_id, 112 int resource_id,
113 ui::ScaleFactor scale_factor) const; 113 ui::ScaleFactor scale_factor) const;
114 114
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 ContentPluginClient* plugin_; 164 ContentPluginClient* plugin_;
165 // The embedder API for participating in renderer logic. 165 // The embedder API for participating in renderer logic.
166 ContentRendererClient* renderer_; 166 ContentRendererClient* renderer_;
167 // The embedder API for participating in utility logic. 167 // The embedder API for participating in utility logic.
168 ContentUtilityClient* utility_; 168 ContentUtilityClient* utility_;
169 }; 169 };
170 170
171 } // namespace content 171 } // namespace content
172 172
173 #endif // CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ 173 #endif // CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_
OLDNEW
« no previous file with comments | « content/child/blink_platform_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698