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

Unified Diff: chromecast/browser/cast_web_contents_user_data.h

Issue 1972433002: [Chromecast] Handle device scale factor correctly (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
Index: chromecast/browser/cast_web_contents_user_data.h
diff --git a/chromecast/browser/cast_web_contents_user_data.h b/chromecast/browser/cast_web_contents_user_data.h
new file mode 100644
index 0000000000000000000000000000000000000000..7e92dfa0d6060f9c48449fc9b02bc851db27897d
--- /dev/null
+++ b/chromecast/browser/cast_web_contents_user_data.h
@@ -0,0 +1,35 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROMECAST_BROWSER_CAST_WEB_CONTENTS_USER_DATA_H_
+#define CHROMECAST_BROWSER_CAST_WEB_CONTENTS_USER_DATA_H_
+
+#include "base/macros.h"
+#include "base/supports_user_data.h"
+
+namespace chromecast {
+namespace shell {
+
+class CastWebContentsUserData : public base::SupportsUserData::Data {
+ public:
+ static void* UserDataKey() {
+ return &key_;
+ }
+
+ explicit CastWebContentsUserData(int resolution_height);
+
+ int resolution_height() const { return resolution_height_; }
+
+ private:
+ static int key_;
+
+ const int resolution_height_;
+
+ DISALLOW_COPY_AND_ASSIGN(CastWebContentsUserData);
+};
+
+} // namespace shell
+} // namespace chromecast
+
+#endif // CHROMECAST_BROWSER_CAST_WEB_CONTENTS_USER_DATA_H_

Powered by Google App Engine
This is Rietveld 408576698