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

Side by Side Diff: Source/core/css/MediaValues.h

Issue 335313003: MediaQueryEvaluator getting mediaType from MediaValues (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added a comment Created 6 years, 5 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 | « Source/core/css/MediaQueryMatcher.cpp ('k') | Source/core/css/MediaValues.cpp » ('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 MediaValues_h 5 #ifndef MediaValues_h
6 #define MediaValues_h 6 #define MediaValues_h
7 7
8 #include "core/css/CSSPrimitiveValue.h" 8 #include "core/css/CSSPrimitiveValue.h"
9 #include "wtf/RefCounted.h" 9 #include "wtf/RefCounted.h"
10 #include "wtf/RefPtr.h" 10 #include "wtf/RefPtr.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 virtual int viewportWidth() const = 0; 52 virtual int viewportWidth() const = 0;
53 virtual int viewportHeight() const = 0; 53 virtual int viewportHeight() const = 0;
54 virtual int deviceWidth() const = 0; 54 virtual int deviceWidth() const = 0;
55 virtual int deviceHeight() const = 0; 55 virtual int deviceHeight() const = 0;
56 virtual float devicePixelRatio() const = 0; 56 virtual float devicePixelRatio() const = 0;
57 virtual int colorBitsPerComponent() const = 0; 57 virtual int colorBitsPerComponent() const = 0;
58 virtual int monochromeBitsPerComponent() const = 0; 58 virtual int monochromeBitsPerComponent() const = 0;
59 virtual PointerDeviceType pointer() const = 0; 59 virtual PointerDeviceType pointer() const = 0;
60 virtual bool threeDEnabled() const = 0; 60 virtual bool threeDEnabled() const = 0;
61 virtual bool scanMediaType() const = 0; 61 virtual const String mediaType() const = 0;
62 virtual bool screenMediaType() const = 0;
63 virtual bool printMediaType() const = 0;
64 virtual bool strictMode() const = 0; 62 virtual bool strictMode() const = 0;
65 virtual Document* document() const = 0; 63 virtual Document* document() const = 0;
66 virtual bool hasValues() const = 0; 64 virtual bool hasValues() const = 0;
67 65
68 protected: 66 protected:
69 int calculateViewportWidth(LocalFrame*) const; 67 int calculateViewportWidth(LocalFrame*) const;
70 int calculateViewportHeight(LocalFrame*) const; 68 int calculateViewportHeight(LocalFrame*) const;
71 int calculateDeviceWidth(LocalFrame*) const; 69 int calculateDeviceWidth(LocalFrame*) const;
72 int calculateDeviceHeight(LocalFrame*) const; 70 int calculateDeviceHeight(LocalFrame*) const;
73 bool calculateStrictMode(LocalFrame*) const; 71 bool calculateStrictMode(LocalFrame*) const;
74 float calculateDevicePixelRatio(LocalFrame*) const; 72 float calculateDevicePixelRatio(LocalFrame*) const;
75 int calculateColorBitsPerComponent(LocalFrame*) const; 73 int calculateColorBitsPerComponent(LocalFrame*) const;
76 int calculateMonochromeBitsPerComponent(LocalFrame*) const; 74 int calculateMonochromeBitsPerComponent(LocalFrame*) const;
77 int calculateDefaultFontSize(LocalFrame*) const; 75 int calculateDefaultFontSize(LocalFrame*) const;
78 bool calculateScanMediaType(LocalFrame*) const; 76 const String calculateMediaType(LocalFrame*) const;
79 bool calculateScreenMediaType(LocalFrame*) const;
80 bool calculatePrintMediaType(LocalFrame*) const;
81 bool calculateThreeDEnabled(LocalFrame*) const; 77 bool calculateThreeDEnabled(LocalFrame*) const;
82 MediaValues::PointerDeviceType calculateLeastCapablePrimaryPointerDeviceType (LocalFrame*) const; 78 MediaValues::PointerDeviceType calculateLeastCapablePrimaryPointerDeviceType (LocalFrame*) const;
83 79
84 }; 80 };
85 81
86 } // namespace 82 } // namespace
87 83
88 #endif // MediaValues_h 84 #endif // MediaValues_h
OLDNEW
« no previous file with comments | « Source/core/css/MediaQueryMatcher.cpp ('k') | Source/core/css/MediaValues.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698