| 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 WebViewImpl* InspectorEmulationAgent::webViewImpl() | 43 WebViewImpl* InspectorEmulationAgent::webViewImpl() |
| 44 { | 44 { |
| 45 return m_webLocalFrameImpl->viewImpl(); | 45 return m_webLocalFrameImpl->viewImpl(); |
| 46 } | 46 } |
| 47 | 47 |
| 48 void InspectorEmulationAgent::restore() | 48 void InspectorEmulationAgent::restore() |
| 49 { | 49 { |
| 50 ErrorString error; | 50 ErrorString error; |
| 51 setScriptExecutionDisabled(&error, m_state->booleanProperty(EmulationAgentSt
ate::scriptExecutionDisabled, false)); | 51 setScriptExecutionDisabled(&error, m_state->booleanProperty(EmulationAgentSt
ate::scriptExecutionDisabled, false)); |
| 52 setTouchEmulationEnabled(&error, m_state->booleanProperty(EmulationAgentStat
e::touchEventEmulationEnabled, false), protocol::Maybe<String>()); | 52 setTouchEmulationEnabled(&error, m_state->booleanProperty(EmulationAgentStat
e::touchEventEmulationEnabled, false), protocol::Maybe<String>()); |
| 53 String16 emulatedMedia; | 53 String 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 setEmulatedMedia(&error, String()); | 63 setEmulatedMedia(&error, String()); |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 frontend()->virtualTimeBudgetExpired(); | 120 frontend()->virtualTimeBudgetExpired(); |
| 121 } | 121 } |
| 122 | 122 |
| 123 DEFINE_TRACE(InspectorEmulationAgent) | 123 DEFINE_TRACE(InspectorEmulationAgent) |
| 124 { | 124 { |
| 125 visitor->trace(m_webLocalFrameImpl); | 125 visitor->trace(m_webLocalFrameImpl); |
| 126 InspectorBaseAgent::trace(visitor); | 126 InspectorBaseAgent::trace(visitor); |
| 127 } | 127 } |
| 128 | 128 |
| 129 } // namespace blink | 129 } // namespace blink |
| OLD | NEW |