| 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/inspector/protocol/DOM.h" | 10 #include "core/inspector/protocol/DOM.h" |
| 11 #include "core/page/Page.h" | 11 #include "core/page/Page.h" |
| 12 #include "platform/geometry/DoubleRect.h" | 12 #include "platform/geometry/DoubleRect.h" |
| 13 #include "platform/graphics/Color.h" | 13 #include "platform/graphics/Color.h" |
| 14 #include "public/platform/Platform.h" | 14 #include "public/platform/Platform.h" |
| 15 #include "public/platform/WebFloatPoint.h" | 15 #include "public/platform/WebFloatPoint.h" |
| 16 #include "public/platform/WebThread.h" | 16 #include "public/platform/WebThread.h" |
| 17 #include "public/platform/WebViewScheduler.h" | 17 #include "public/platform/WebViewScheduler.h" |
| 18 #include "web/DevToolsEmulator.h" | 18 #include "web/DevToolsEmulator.h" |
| 19 #include "web/WebLocalFrameImpl.h" | 19 #include "web/WebLocalFrameImpl.h" |
| 20 #include "web/WebViewImpl.h" | 20 #include "web/WebViewImpl.h" |
| 21 | 21 |
| 22 namespace blink { | 22 namespace blink { |
| 23 | 23 |
| 24 using protocol::Maybe; |
| 25 using protocol::Response; |
| 26 |
| 24 namespace EmulationAgentState { | 27 namespace EmulationAgentState { |
| 25 static const char scriptExecutionDisabled[] = "scriptExecutionDisabled"; | 28 static const char scriptExecutionDisabled[] = "scriptExecutionDisabled"; |
| 26 static const char touchEventEmulationEnabled[] = "touchEventEmulationEnabled"; | 29 static const char touchEventEmulationEnabled[] = "touchEventEmulationEnabled"; |
| 27 static const char emulatedMedia[] = "emulatedMedia"; | 30 static const char emulatedMedia[] = "emulatedMedia"; |
| 28 static const char forcedViewportEnabled[] = "forcedViewportEnabled"; | 31 static const char forcedViewportEnabled[] = "forcedViewportEnabled"; |
| 29 static const char forcedViewportX[] = "forcedViewportX"; | 32 static const char forcedViewportX[] = "forcedViewportX"; |
| 30 static const char forcedViewportY[] = "forcedViewportY"; | 33 static const char forcedViewportY[] = "forcedViewportY"; |
| 31 static const char forcedViewportScale[] = "forcedViewportScale"; | 34 static const char forcedViewportScale[] = "forcedViewportScale"; |
| 32 static const char defaultBackgroundColorOverrideRGBA[] = | 35 static const char defaultBackgroundColorOverrideRGBA[] = |
| 33 "defaultBackgroundColorOverrideRGBA"; | 36 "defaultBackgroundColorOverrideRGBA"; |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 Color(rgba->getR(), rgba->getG(), rgba->getB(), alpha).rgb()); | 205 Color(rgba->getR(), rgba->getG(), rgba->getB(), alpha).rgb()); |
| 203 return Response::OK(); | 206 return Response::OK(); |
| 204 } | 207 } |
| 205 | 208 |
| 206 DEFINE_TRACE(InspectorEmulationAgent) { | 209 DEFINE_TRACE(InspectorEmulationAgent) { |
| 207 visitor->trace(m_webLocalFrameImpl); | 210 visitor->trace(m_webLocalFrameImpl); |
| 208 InspectorBaseAgent::trace(visitor); | 211 InspectorBaseAgent::trace(visitor); |
| 209 } | 212 } |
| 210 | 213 |
| 211 } // namespace blink | 214 } // namespace blink |
| OLD | NEW |