| OLD | NEW |
| 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 "web/InspectorEmulationAgent.h" | 5 #include "web/InspectorEmulationAgent.h" |
| 6 | 6 |
| 7 #include "core/frame/FrameHost.h" | 7 #include "core/frame/FrameHost.h" |
| 8 #include "core/frame/FrameView.h" | 8 #include "core/frame/FrameView.h" |
| 9 #include "core/frame/Settings.h" | 9 #include "core/frame/Settings.h" |
| 10 #include "core/page/Page.h" | 10 #include "core/page/Page.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 String16 emulatedMedia; | 53 String16 emulatedMedia; |
| 54 m_state->getString(EmulationAgentState::emulatedMedia, &emulatedMedia); | 54 m_state->getString(EmulationAgentState::emulatedMedia, &emulatedMedia); |
| 55 setEmulatedMedia(&error, emulatedMedia); | 55 setEmulatedMedia(&error, emulatedMedia); |
| 56 } | 56 } |
| 57 | 57 |
| 58 void InspectorEmulationAgent::disable(ErrorString*) | 58 void InspectorEmulationAgent::disable(ErrorString*) |
| 59 { | 59 { |
| 60 ErrorString error; | 60 ErrorString error; |
| 61 setScriptExecutionDisabled(&error, false); | 61 setScriptExecutionDisabled(&error, false); |
| 62 setTouchEmulationEnabled(&error, false, protocol::Maybe<String>()); | 62 setTouchEmulationEnabled(&error, false, protocol::Maybe<String>()); |
| 63 setCPUThrottlingRate(&error, 1); |
| 63 setEmulatedMedia(&error, String()); | 64 setEmulatedMedia(&error, String()); |
| 64 } | 65 } |
| 65 | 66 |
| 66 void InspectorEmulationAgent::resetPageScaleFactor(ErrorString*) | 67 void InspectorEmulationAgent::resetPageScaleFactor(ErrorString*) |
| 67 { | 68 { |
| 68 webViewImpl()->resetScaleStateImmediately(); | 69 webViewImpl()->resetScaleStateImmediately(); |
| 69 } | 70 } |
| 70 | 71 |
| 71 void InspectorEmulationAgent::setPageScaleFactor(ErrorString*, double pageScaleF
actor) | 72 void InspectorEmulationAgent::setPageScaleFactor(ErrorString*, double pageScaleF
actor) |
| 72 { | 73 { |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 frontend()->virtualTimeBudgetExpired(); | 121 frontend()->virtualTimeBudgetExpired(); |
| 121 } | 122 } |
| 122 | 123 |
| 123 DEFINE_TRACE(InspectorEmulationAgent) | 124 DEFINE_TRACE(InspectorEmulationAgent) |
| 124 { | 125 { |
| 125 visitor->trace(m_webLocalFrameImpl); | 126 visitor->trace(m_webLocalFrameImpl); |
| 126 InspectorBaseAgent::trace(visitor); | 127 InspectorBaseAgent::trace(visitor); |
| 127 } | 128 } |
| 128 | 129 |
| 129 } // namespace blink | 130 } // namespace blink |
| OLD | NEW |