OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 WebFrameOwnerProperties_h | 5 #ifndef WebFrameOwnerProperties_h |
6 #define WebFrameOwnerProperties_h | 6 #define WebFrameOwnerProperties_h |
7 | 7 |
8 #include "public/platform/WebVector.h" | 8 #include "public/platform/WebVector.h" |
9 #include "public/platform/modules/permissions/WebPermissionType.h" | 9 #include "public/platform/modules/permissions/WebPermissionType.h" |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 25 matching lines...) Expand all Loading... |
36 #if INSIDE_BLINK | 36 #if INSIDE_BLINK |
37 WebFrameOwnerProperties(ScrollbarMode scrollingMode, int marginWidth, int ma
rginHeight, bool allowFullscreen, const WebVector<WebPermissionType>& delegatedP
ermissions) | 37 WebFrameOwnerProperties(ScrollbarMode scrollingMode, int marginWidth, int ma
rginHeight, bool allowFullscreen, const WebVector<WebPermissionType>& delegatedP
ermissions) |
38 : scrollingMode(static_cast<ScrollingMode>(scrollingMode)) | 38 : scrollingMode(static_cast<ScrollingMode>(scrollingMode)) |
39 , marginWidth(marginWidth) | 39 , marginWidth(marginWidth) |
40 , marginHeight(marginHeight) | 40 , marginHeight(marginHeight) |
41 , allowFullscreen(allowFullscreen) | 41 , allowFullscreen(allowFullscreen) |
42 , delegatedPermissions(delegatedPermissions) | 42 , delegatedPermissions(delegatedPermissions) |
43 { | 43 { |
44 } | 44 } |
45 #endif | 45 #endif |
46 | |
47 bool operator==(const WebFrameOwnerProperties& other) const | |
48 { | |
49 return scrollingMode == other.scrollingMode | |
50 && marginWidth == other.marginWidth | |
51 && marginHeight == other.marginHeight | |
52 && allowFullscreen == other.allowFullscreen | |
53 && std::equal(delegatedPermissions.begin(), | |
54 delegatedPermissions.end(), | |
55 other.delegatedPermissions.begin()); | |
56 } | |
57 | |
58 bool operator!=(const WebFrameOwnerProperties& other) const | |
59 { | |
60 return !(*this == other); | |
61 } | |
62 }; | 46 }; |
63 | 47 |
64 } // namespace blink | 48 } // namespace blink |
65 | 49 |
66 #endif | 50 #endif |
OLD | NEW |