| OLD | NEW | 
|   1 // Copyright 2014 The Chromium Authors. All rights reserved. |   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 |   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 DOMWindow_h | 
 |   6 #define DOMWindow_h | 
 |   7  | 
|   5 namespace blink { |   8 namespace blink { | 
|   6  |   9  | 
|   7 class ScriptWrappable; |  10 class ScriptWrappable; | 
|   8  |  11  | 
|   9 class DOMWindow { |  12 class DOMWindow { | 
|  10 public: |  13 public: | 
|  11     // Ideally, DOMWindow would be a ScriptWrappable. However, LocalDOMWindow |  14     // Ideally, DOMWindow would be a ScriptWrappable. However, LocalDOMWindow | 
|  12     // already has a ScriptWrappable subclass via EventTargetWithInlineData. As |  15     // already has a ScriptWrappable subclass via EventTargetWithInlineData. As | 
|  13     // a result, making DOMWindow a ScriptWrappable would force callers of |  16     // a result, making DOMWindow a ScriptWrappable would force callers of | 
|  14     // ScriptWrappable methods on DOMWindow methods to disambiguate which base |  17     // ScriptWrappable methods on DOMWindow methods to disambiguate which base | 
|  15     // class to access the methods through. To avoid this trouble, DOMWindow |  18     // class to access the methods through. To avoid this trouble, DOMWindow | 
|  16     // exposes an interface method to convert the DOMWindow to a ScriptWrappable |  19     // exposes an interface method to convert the DOMWindow to a ScriptWrappable | 
|  17     // instead. |  20     // instead. | 
|  18     virtual ScriptWrappable* toScriptWrappable() = 0; |  21     virtual ScriptWrappable* toScriptWrappable() = 0; | 
|  19 }; |  22 }; | 
|  20  |  23  | 
|  21 } // namespace blink |  24 } // namespace blink | 
 |  25  | 
 |  26 #endif // DOMWindow_h | 
| OLD | NEW |