| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 namespace blink { |
| 6 |
| 7 class ScriptWrappable; |
| 8 |
| 9 class DOMWindow { |
| 10 public: |
| 11 // Ideally, DOMWindow would be a ScriptWrappable. However, LocalDOMWindow |
| 12 // already has a ScriptWrappable subclass via EventTargetWithInlineData. As |
| 13 // a result, making DOMWindow a ScriptWrappable would force callers of |
| 14 // ScriptWrappable methods on DOMWindow methods to disambiguate which base |
| 15 // class to access the methods through. To avoid this trouble, DOMWindow |
| 16 // exposes an interface method to convert the DOMWindow to a ScriptWrappable |
| 17 // instead. |
| 18 virtual ScriptWrappable* toScriptWrappable() = 0; |
| 19 }; |
| 20 |
| 21 } // namespace blink |
| OLD | NEW |