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

Side by Side Diff: third_party/WebKit/Source/core/layout/api/LayoutEmbeddedItem.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 LayoutEmbeddedItem_h 5 #ifndef LayoutEmbeddedItem_h
6 #define LayoutEmbeddedItem_h 6 #define LayoutEmbeddedItem_h
7 7
8 #include "core/layout/LayoutEmbeddedObject.h" 8 #include "core/layout/LayoutEmbeddedObject.h"
9 #include "core/layout/api/LayoutPartItem.h" 9 #include "core/layout/api/LayoutPartItem.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 class LayoutEmbeddedItem : public LayoutPartItem { 13 class LayoutEmbeddedItem : public LayoutPartItem {
14 public: 14 public:
15 explicit LayoutEmbeddedItem(LayoutEmbeddedObject* layoutEmbeddedObject) 15 explicit LayoutEmbeddedItem(LayoutEmbeddedObject* layoutEmbeddedObject)
16 : LayoutPartItem(layoutEmbeddedObject) {} 16 : LayoutPartItem(layoutEmbeddedObject) {}
17 17
18 explicit LayoutEmbeddedItem(const LayoutItem& item) : LayoutPartItem(item) { 18 explicit LayoutEmbeddedItem(const LayoutItem& item) : LayoutPartItem(item) {
19 ASSERT_WITH_SECURITY_IMPLICATION(!item || item.isEmbeddedObject()); 19 SECURITY_DCHECK(!item || item.isEmbeddedObject());
20 } 20 }
21 21
22 explicit LayoutEmbeddedItem(std::nullptr_t) : LayoutPartItem(nullptr) {} 22 explicit LayoutEmbeddedItem(std::nullptr_t) : LayoutPartItem(nullptr) {}
23 23
24 LayoutEmbeddedItem() {} 24 LayoutEmbeddedItem() {}
25 25
26 void setPluginAvailability( 26 void setPluginAvailability(
27 LayoutEmbeddedObject::PluginAvailability availability) { 27 LayoutEmbeddedObject::PluginAvailability availability) {
28 toEmbeddedObject()->setPluginAvailability(availability); 28 toEmbeddedObject()->setPluginAvailability(availability);
29 } 29 }
30 30
31 bool showsUnavailablePluginIndicator() const { 31 bool showsUnavailablePluginIndicator() const {
32 return toEmbeddedObject()->showsUnavailablePluginIndicator(); 32 return toEmbeddedObject()->showsUnavailablePluginIndicator();
33 } 33 }
34 34
35 private: 35 private:
36 LayoutEmbeddedObject* toEmbeddedObject() { 36 LayoutEmbeddedObject* toEmbeddedObject() {
37 return toLayoutEmbeddedObject(layoutObject()); 37 return toLayoutEmbeddedObject(layoutObject());
38 } 38 }
39 39
40 const LayoutEmbeddedObject* toEmbeddedObject() const { 40 const LayoutEmbeddedObject* toEmbeddedObject() const {
41 return toLayoutEmbeddedObject(layoutObject()); 41 return toLayoutEmbeddedObject(layoutObject());
42 } 42 }
43 }; 43 };
44 44
45 } // namespace blink 45 } // namespace blink
46 46
47 #endif // LayoutEmbeddedItem_h 47 #endif // LayoutEmbeddedItem_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698