Skip to content

Commit

Permalink
Remove unnecessary usages of DEFINE_TYPE_CASTS()
Browse files Browse the repository at this point in the history
- Remove DEFINE_DOCUMENT_TYPE_CASTS() macro
  It's not used.

- Remove DEFINE_TRACK_TYPE_CASTS() macro
  It's not used.

- Remove DEFINE_TYPE_CASTS() for PresentationConnectionAvailableEvent
  The code generated by this DEFINE_TYPE_CASTS() are not used.

This CL has no behavior changes.

Bug: 891908
Change-Id: I8a60227c042f85c7d25184258e105b1ba2a9eebb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2546393
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Auto-Submit: Kent Tamura <tkent@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#828826}
  • Loading branch information
tkent-google authored and Commit Bot committed Nov 18, 2020
1 parent 647f331 commit 9c60888
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 17 deletions.
4 changes: 0 additions & 4 deletions third_party/blink/renderer/core/dom/document.h
Original file line number Diff line number Diff line change
Expand Up @@ -2240,10 +2240,6 @@ inline void Document::ScheduleLayoutTreeUpdateIfNeeded() {
ScheduleLayoutTreeUpdate();
}

#define DEFINE_DOCUMENT_TYPE_CASTS(thisType) \
DEFINE_TYPE_CASTS(thisType, Document, document, document->Is##thisType(), \
document.Is##thisType())

// This is needed to avoid ambiguous overloads with the Node and TreeScope
// versions.
DEFINE_COMPARISON_OPERATORS_WITH_REFERENCES(Document)
Expand Down
4 changes: 0 additions & 4 deletions third_party/blink/renderer/core/html/track/track_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,6 @@ class CORE_EXPORT TrackBase : public Supplementable<TrackBase> {
Member<HTMLMediaElement> media_element_;
};

#define DEFINE_TRACK_TYPE_CASTS(thisType, predicate) \
DEFINE_TYPE_CASTS(thisType, TrackBase, track, track->GetType() == predicate, \
track.GetType() == predicate)

} // namespace blink

#endif // THIRD_PARTY_BLINK_RENDERER_CORE_HTML_TRACK_TRACK_BASE_H_
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,6 @@ class PresentationConnectionAvailableEvent final : public Event {
Member<PresentationConnection> connection_;
};

DEFINE_TYPE_CASTS(
PresentationConnectionAvailableEvent,
Event,
event,
event->InterfaceName() ==
event_interface_names::kPresentationConnectionAvailableEvent,
event.InterfaceName() ==
event_interface_names::kPresentationConnectionAvailableEvent);

} // namespace blink

#endif // THIRD_PARTY_BLINK_RENDERER_MODULES_PRESENTATION_PRESENTATION_CONNECTION_AVAILABLE_EVENT_H_

0 comments on commit 9c60888

Please sign in to comment.