| 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 #include "modules/screen_orientation/ScreenScreenOrientation.h" | 5 #include "modules/screen_orientation/ScreenScreenOrientation.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/ScriptState.h" | |
| 8 #include "core/frame/Screen.h" | 7 #include "core/frame/Screen.h" |
| 9 #include "modules/screen_orientation/ScreenOrientation.h" | 8 #include "modules/screen_orientation/ScreenOrientation.h" |
| 9 #include "platform/bindings/ScriptState.h" |
| 10 | 10 |
| 11 namespace blink { | 11 namespace blink { |
| 12 | 12 |
| 13 // static | 13 // static |
| 14 ScreenScreenOrientation& ScreenScreenOrientation::From(Screen& screen) { | 14 ScreenScreenOrientation& ScreenScreenOrientation::From(Screen& screen) { |
| 15 ScreenScreenOrientation* supplement = static_cast<ScreenScreenOrientation*>( | 15 ScreenScreenOrientation* supplement = static_cast<ScreenScreenOrientation*>( |
| 16 Supplement<Screen>::From(screen, SupplementName())); | 16 Supplement<Screen>::From(screen, SupplementName())); |
| 17 if (!supplement) { | 17 if (!supplement) { |
| 18 supplement = new ScreenScreenOrientation(); | 18 supplement = new ScreenScreenOrientation(); |
| 19 ProvideTo(screen, SupplementName(), supplement); | 19 ProvideTo(screen, SupplementName(), supplement); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 37 const char* ScreenScreenOrientation::SupplementName() { | 37 const char* ScreenScreenOrientation::SupplementName() { |
| 38 return "ScreenScreenOrientation"; | 38 return "ScreenScreenOrientation"; |
| 39 } | 39 } |
| 40 | 40 |
| 41 DEFINE_TRACE(ScreenScreenOrientation) { | 41 DEFINE_TRACE(ScreenScreenOrientation) { |
| 42 visitor->Trace(orientation_); | 42 visitor->Trace(orientation_); |
| 43 Supplement<Screen>::Trace(visitor); | 43 Supplement<Screen>::Trace(visitor); |
| 44 } | 44 } |
| 45 | 45 |
| 46 } // namespace blink | 46 } // namespace blink |
| OLD | NEW |