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

Unified Diff: ios/web/public/user_agent.h

Issue 2705293014: Created web::UserAgentType. (Closed)
Patch Set: rebase + compile fix Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/web/public/navigation_item.h ('k') | ios/web/public/user_agent.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/public/user_agent.h
diff --git a/ios/web/public/user_agent.h b/ios/web/public/user_agent.h
index 627875e8153cdfef5be06bc8037b2cf5a12956ae..9c7687e9398d3f107b8c41ad17f20c70576bf106 100644
--- a/ios/web/public/user_agent.h
+++ b/ios/web/public/user_agent.h
@@ -9,6 +9,25 @@
namespace web {
+// Enum type specifying a user agent's type.
+enum class UserAgentType : short {
+ // Used for pages that are generated for app-specific URLs.
+ NONE = 0,
+
+ // The default user agent type. Used to specify a mobile browser user agent.
+ MOBILE,
+
+ // Used to specify a desktop browser user agent.
+ DESKTOP
+};
+
+// Returns a string representation of |type|.
+std::string GetUserAgentTypeDescription(UserAgentType type);
+
+// Returns a UserAgentType with the given description. If |description| doesn't
+// correspond with a UserAgentType, UserAgentType::NONE will be returned.
+UserAgentType GetUserAgentTypeWithDescription(const std::string& description);
+
// Returns the os cpu info portion for a user agent.
std::string BuildOSCpuInfo();
« no previous file with comments | « ios/web/public/navigation_item.h ('k') | ios/web/public/user_agent.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698