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

Side by Side Diff: third_party/WebKit/Source/modules/screen_orientation/ScreenOrientationInspectorAgent.cpp

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/ScreenOrientationInspectorAgent.h" 5 #include "modules/screen_orientation/ScreenOrientationInspectorAgent.h"
6 6
7 #include "core/InspectorTypeBuilder.h" 7 #include "core/InspectorTypeBuilder.h"
8 #include "core/frame/LocalFrame.h" 8 #include "core/frame/LocalFrame.h"
9 #include "modules/screen_orientation/ScreenOrientation.h" 9 #include "modules/screen_orientation/ScreenOrientation.h"
10 #include "modules/screen_orientation/ScreenOrientationController.h" 10 #include "modules/screen_orientation/ScreenOrientationController.h"
(...skipping 17 matching lines...) Expand all
28 if (type == TypeBuilder::getEnumConstantValue(TypeBuilder::ScreenOrientation ::OrientationType::LandscapePrimary)) 28 if (type == TypeBuilder::getEnumConstantValue(TypeBuilder::ScreenOrientation ::OrientationType::LandscapePrimary))
29 return WebScreenOrientationLandscapePrimary; 29 return WebScreenOrientationLandscapePrimary;
30 if (type == TypeBuilder::getEnumConstantValue(TypeBuilder::ScreenOrientation ::OrientationType::LandscapeSecondary)) 30 if (type == TypeBuilder::getEnumConstantValue(TypeBuilder::ScreenOrientation ::OrientationType::LandscapeSecondary))
31 return WebScreenOrientationLandscapeSecondary; 31 return WebScreenOrientationLandscapeSecondary;
32 return WebScreenOrientationUndefined; 32 return WebScreenOrientationUndefined;
33 } 33 }
34 34
35 } // namespace 35 } // namespace
36 36
37 // static 37 // static
38 PassOwnPtrWillBeRawPtr<ScreenOrientationInspectorAgent> ScreenOrientationInspect orAgent::create(LocalFrame& frame) 38 RawPtr<ScreenOrientationInspectorAgent> ScreenOrientationInspectorAgent::create( LocalFrame& frame)
39 { 39 {
40 return adoptPtrWillBeNoop(new ScreenOrientationInspectorAgent(frame)); 40 return (new ScreenOrientationInspectorAgent(frame));
41 } 41 }
42 42
43 ScreenOrientationInspectorAgent::~ScreenOrientationInspectorAgent() 43 ScreenOrientationInspectorAgent::~ScreenOrientationInspectorAgent()
44 { 44 {
45 } 45 }
46 46
47 ScreenOrientationInspectorAgent::ScreenOrientationInspectorAgent(LocalFrame& fra me) 47 ScreenOrientationInspectorAgent::ScreenOrientationInspectorAgent(LocalFrame& fra me)
48 : InspectorBaseAgent<ScreenOrientationInspectorAgent, InspectorFrontend::Scr eenOrientation>("ScreenOrientation") 48 : InspectorBaseAgent<ScreenOrientationInspectorAgent, InspectorFrontend::Scr eenOrientation>("ScreenOrientation")
49 , m_frame(&frame) 49 , m_frame(&frame)
50 { 50 {
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 m_state->getNumber(ScreenOrientationInspectorAgentState::type, &longType ); 103 m_state->getNumber(ScreenOrientationInspectorAgentState::type, &longType );
104 WebScreenOrientationType type = static_cast<WebScreenOrientationType>(lo ngType); 104 WebScreenOrientationType type = static_cast<WebScreenOrientationType>(lo ngType);
105 int angle = 0; 105 int angle = 0;
106 m_state->getNumber(ScreenOrientationInspectorAgentState::angle, &angle); 106 m_state->getNumber(ScreenOrientationInspectorAgentState::angle, &angle);
107 if (ScreenOrientationController* controller = ScreenOrientationControlle r::from(*m_frame)) 107 if (ScreenOrientationController* controller = ScreenOrientationControlle r::from(*m_frame))
108 controller->setOverride(type, angle); 108 controller->setOverride(type, angle);
109 } 109 }
110 } 110 }
111 111
112 } // namespace blink 112 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698