| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 #include "core/dom/Node.h" | 38 #include "core/dom/Node.h" |
| 39 #include "core/dom/StaticNodeList.h" | 39 #include "core/dom/StaticNodeList.h" |
| 40 #include "core/dom/TaskRunnerHelper.h" | 40 #include "core/dom/TaskRunnerHelper.h" |
| 41 #include "core/events/WebInputEventConversion.h" | 41 #include "core/events/WebInputEventConversion.h" |
| 42 #include "core/exported/WebViewBase.h" | 42 #include "core/exported/WebViewBase.h" |
| 43 #include "core/frame/FrameView.h" | 43 #include "core/frame/FrameView.h" |
| 44 #include "core/frame/LocalFrame.h" | 44 #include "core/frame/LocalFrame.h" |
| 45 #include "core/frame/LocalFrameClient.h" | 45 #include "core/frame/LocalFrameClient.h" |
| 46 #include "core/frame/Settings.h" | 46 #include "core/frame/Settings.h" |
| 47 #include "core/frame/VisualViewport.h" | 47 #include "core/frame/VisualViewport.h" |
| 48 #include "core/frame/WebLocalFrameBase.h" |
| 48 #include "core/html/HTMLFrameOwnerElement.h" | 49 #include "core/html/HTMLFrameOwnerElement.h" |
| 49 #include "core/input/EventHandler.h" | 50 #include "core/input/EventHandler.h" |
| 50 #include "core/inspector/IdentifiersFactory.h" | 51 #include "core/inspector/IdentifiersFactory.h" |
| 51 #include "core/inspector/InspectedFrames.h" | 52 #include "core/inspector/InspectedFrames.h" |
| 52 #include "core/inspector/InspectorDOMAgent.h" | 53 #include "core/inspector/InspectorDOMAgent.h" |
| 53 #include "core/inspector/InspectorOverlayHost.h" | 54 #include "core/inspector/InspectorOverlayHost.h" |
| 54 #include "core/layout/api/LayoutViewItem.h" | 55 #include "core/layout/api/LayoutViewItem.h" |
| 55 #include "core/loader/EmptyClients.h" | 56 #include "core/loader/EmptyClients.h" |
| 56 #include "core/loader/FrameLoadRequest.h" | 57 #include "core/loader/FrameLoadRequest.h" |
| 57 #include "core/page/ChromeClient.h" | 58 #include "core/page/ChromeClient.h" |
| 58 #include "core/page/Page.h" | 59 #include "core/page/Page.h" |
| 59 #include "platform/ScriptForbiddenScope.h" | 60 #include "platform/ScriptForbiddenScope.h" |
| 60 #include "platform/graphics/Color.h" | 61 #include "platform/graphics/Color.h" |
| 61 #include "platform/graphics/GraphicsContext.h" | 62 #include "platform/graphics/GraphicsContext.h" |
| 62 #include "platform/graphics/paint/CullRect.h" | 63 #include "platform/graphics/paint/CullRect.h" |
| 63 #include "platform/wtf/AutoReset.h" | 64 #include "platform/wtf/AutoReset.h" |
| 64 #include "public/platform/Platform.h" | 65 #include "public/platform/Platform.h" |
| 65 #include "public/platform/WebData.h" | 66 #include "public/platform/WebData.h" |
| 66 #include "v8/include/v8.h" | 67 #include "v8/include/v8.h" |
| 67 #include "web/PageOverlay.h" | 68 #include "web/PageOverlay.h" |
| 68 #include "web/WebLocalFrameImpl.h" | |
| 69 | 69 |
| 70 namespace blink { | 70 namespace blink { |
| 71 | 71 |
| 72 using protocol::Maybe; | 72 using protocol::Maybe; |
| 73 using protocol::Response; | 73 using protocol::Response; |
| 74 | 74 |
| 75 namespace { | 75 namespace { |
| 76 | 76 |
| 77 namespace OverlayAgentState { | 77 namespace OverlayAgentState { |
| 78 static const char kEnabled[] = "enabled"; | 78 static const char kEnabled[] = "enabled"; |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 private: | 204 private: |
| 205 InspectorOverlayChromeClient(ChromeClient& client, | 205 InspectorOverlayChromeClient(ChromeClient& client, |
| 206 InspectorOverlayAgent& overlay) | 206 InspectorOverlayAgent& overlay) |
| 207 : client_(&client), overlay_(&overlay) {} | 207 : client_(&client), overlay_(&overlay) {} |
| 208 | 208 |
| 209 Member<ChromeClient> client_; | 209 Member<ChromeClient> client_; |
| 210 Member<InspectorOverlayAgent> overlay_; | 210 Member<InspectorOverlayAgent> overlay_; |
| 211 }; | 211 }; |
| 212 | 212 |
| 213 InspectorOverlayAgent::InspectorOverlayAgent( | 213 InspectorOverlayAgent::InspectorOverlayAgent( |
| 214 WebLocalFrameImpl* frame_impl, | 214 WebLocalFrameBase* frame_impl, |
| 215 InspectedFrames* inspected_frames, | 215 InspectedFrames* inspected_frames, |
| 216 v8_inspector::V8InspectorSession* v8_session, | 216 v8_inspector::V8InspectorSession* v8_session, |
| 217 InspectorDOMAgent* dom_agent) | 217 InspectorDOMAgent* dom_agent) |
| 218 : frame_impl_(frame_impl), | 218 : frame_impl_(frame_impl), |
| 219 inspected_frames_(inspected_frames), | 219 inspected_frames_(inspected_frames), |
| 220 enabled_(false), | 220 enabled_(false), |
| 221 draw_view_size_(false), | 221 draw_view_size_(false), |
| 222 resize_timer_active_(false), | 222 resize_timer_active_(false), |
| 223 omit_tooltip_(false), | 223 omit_tooltip_(false), |
| 224 timer_(TaskRunnerHelper::Get(TaskType::kUnspecedTimer, | 224 timer_(TaskRunnerHelper::Get(TaskType::kUnspecedTimer, |
| (...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1173 InspectorDOMAgent::ParseColor(config->getShapeColor(nullptr)); | 1173 InspectorDOMAgent::ParseColor(config->getShapeColor(nullptr)); |
| 1174 highlight_config->shape_margin = | 1174 highlight_config->shape_margin = |
| 1175 InspectorDOMAgent::ParseColor(config->getShapeMarginColor(nullptr)); | 1175 InspectorDOMAgent::ParseColor(config->getShapeMarginColor(nullptr)); |
| 1176 highlight_config->selector_list = config->getSelectorList(""); | 1176 highlight_config->selector_list = config->getSelectorList(""); |
| 1177 | 1177 |
| 1178 *out_config = std::move(highlight_config); | 1178 *out_config = std::move(highlight_config); |
| 1179 return Response::OK(); | 1179 return Response::OK(); |
| 1180 } | 1180 } |
| 1181 | 1181 |
| 1182 } // namespace blink | 1182 } // namespace blink |
| OLD | NEW |