| OLD | NEW |
| 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 #include "core/frame/ScreenOrientationController.h" | 5 #include "core/frame/ScreenOrientationController.h" |
| 6 | 6 |
| 7 namespace blink { | 7 namespace blink { |
| 8 | 8 |
| 9 ScreenOrientationController::ScreenOrientationController(LocalFrame& frame) |
| 10 : Supplement<LocalFrame>(frame) {} |
| 11 |
| 9 // static | 12 // static |
| 10 ScreenOrientationController* ScreenOrientationController::from( | 13 ScreenOrientationController* ScreenOrientationController::from( |
| 11 LocalFrame& frame) { | 14 LocalFrame& frame) { |
| 12 return static_cast<ScreenOrientationController*>( | 15 return static_cast<ScreenOrientationController*>( |
| 13 Supplement<LocalFrame>::from(frame, supplementName())); | 16 Supplement<LocalFrame>::from(frame, supplementName())); |
| 14 } | 17 } |
| 15 | 18 |
| 16 DEFINE_TRACE(ScreenOrientationController) { | 19 DEFINE_TRACE(ScreenOrientationController) { |
| 17 Supplement<LocalFrame>::trace(visitor); | 20 Supplement<LocalFrame>::trace(visitor); |
| 18 } | 21 } |
| 19 | 22 |
| 20 // static | 23 // static |
| 21 void ScreenOrientationController::provideTo( | 24 void ScreenOrientationController::provideTo( |
| 22 LocalFrame& frame, | 25 LocalFrame& frame, |
| 23 ScreenOrientationController* controller) { | 26 ScreenOrientationController* controller) { |
| 24 Supplement<LocalFrame>::provideTo(frame, supplementName(), controller); | 27 Supplement<LocalFrame>::provideTo(frame, supplementName(), controller); |
| 25 } | 28 } |
| 26 | 29 |
| 27 // static | 30 // static |
| 28 const char* ScreenOrientationController::supplementName() { | 31 const char* ScreenOrientationController::supplementName() { |
| 29 return "ScreenOrientationController"; | 32 return "ScreenOrientationController"; |
| 30 } | 33 } |
| 31 | 34 |
| 32 } // namespace blink | 35 } // namespace blink |
| OLD | NEW |