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

Side by Side Diff: third_party/WebKit/Source/core/layout/api/LayoutMediaItem.h

Issue 2458003002: Remove ASSERT_WITH_SECURITY_IMPLICATION. (Closed)
Patch Set: Minor formatting fix Created 4 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 LayoutMediaItem_h 5 #ifndef LayoutMediaItem_h
6 #define LayoutMediaItem_h 6 #define LayoutMediaItem_h
7 7
8 #include "core/layout/LayoutMedia.h" 8 #include "core/layout/LayoutMedia.h"
9 #include "core/layout/api/LayoutImageItem.h" 9 #include "core/layout/api/LayoutImageItem.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 class LayoutMediaItem : public LayoutImageItem { 13 class LayoutMediaItem : public LayoutImageItem {
14 public: 14 public:
15 explicit LayoutMediaItem(LayoutMedia* layoutMedia) 15 explicit LayoutMediaItem(LayoutMedia* layoutMedia)
16 : LayoutImageItem(layoutMedia) {} 16 : LayoutImageItem(layoutMedia) {}
17 17
18 explicit LayoutMediaItem(const LayoutItem& item) : LayoutImageItem(item) { 18 explicit LayoutMediaItem(const LayoutItem& item) : LayoutImageItem(item) {
19 ASSERT_WITH_SECURITY_IMPLICATION(!item || item.isMedia()); 19 SECURITY_DCHECK(!item || item.isMedia());
20 } 20 }
21 21
22 explicit LayoutMediaItem(std::nullptr_t) : LayoutImageItem(nullptr) {} 22 explicit LayoutMediaItem(std::nullptr_t) : LayoutImageItem(nullptr) {}
23 23
24 LayoutMediaItem() {} 24 LayoutMediaItem() {}
25 25
26 void setRequestPositionUpdates(bool want) { 26 void setRequestPositionUpdates(bool want) {
27 return toMedia()->setRequestPositionUpdates(want); 27 return toMedia()->setRequestPositionUpdates(want);
28 } 28 }
29 29
30 private: 30 private:
31 LayoutMedia* toMedia() { return toLayoutMedia(layoutObject()); } 31 LayoutMedia* toMedia() { return toLayoutMedia(layoutObject()); }
32 32
33 const LayoutMedia* toMedia() const { return toLayoutMedia(layoutObject()); } 33 const LayoutMedia* toMedia() const { return toLayoutMedia(layoutObject()); }
34 }; 34 };
35 35
36 } // namespace blink 36 } // namespace blink
37 37
38 #endif // LayoutMediaItem_h 38 #endif // LayoutMediaItem_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698