Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: third_party/WebKit/Source/core/frame/ScreenOrientationController.cpp

Issue 2625043002: Use a new Supplement constructor in ScreenOrientationController (Closed)
Patch Set: temp Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698