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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 #include "core/page/ChromeClient.h" | 57 #include "core/page/ChromeClient.h" |
58 #include "core/page/Page.h" | 58 #include "core/page/Page.h" |
59 #include "platform/ScriptForbiddenScope.h" | 59 #include "platform/ScriptForbiddenScope.h" |
60 #include "platform/graphics/Color.h" | 60 #include "platform/graphics/Color.h" |
61 #include "platform/graphics/GraphicsContext.h" | 61 #include "platform/graphics/GraphicsContext.h" |
62 #include "platform/graphics/paint/CullRect.h" | 62 #include "platform/graphics/paint/CullRect.h" |
63 #include "platform/wtf/AutoReset.h" | 63 #include "platform/wtf/AutoReset.h" |
64 #include "public/platform/Platform.h" | 64 #include "public/platform/Platform.h" |
65 #include "public/platform/WebData.h" | 65 #include "public/platform/WebData.h" |
66 #include "v8/include/v8.h" | 66 #include "v8/include/v8.h" |
67 #include "web/ChromeClientImpl.h" | |
68 #include "web/PageOverlay.h" | 67 #include "web/PageOverlay.h" |
69 #include "web/WebLocalFrameImpl.h" | 68 #include "web/WebLocalFrameImpl.h" |
70 | 69 |
71 namespace blink { | 70 namespace blink { |
72 | 71 |
73 using protocol::Maybe; | 72 using protocol::Maybe; |
74 using protocol::Response; | 73 using protocol::Response; |
75 | 74 |
76 namespace { | 75 namespace { |
77 | 76 |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 return new InspectorOverlayChromeClient(client, overlay); | 173 return new InspectorOverlayChromeClient(client, overlay); |
175 } | 174 } |
176 | 175 |
177 DEFINE_INLINE_VIRTUAL_TRACE() { | 176 DEFINE_INLINE_VIRTUAL_TRACE() { |
178 visitor->Trace(client_); | 177 visitor->Trace(client_); |
179 visitor->Trace(overlay_); | 178 visitor->Trace(overlay_); |
180 EmptyChromeClient::Trace(visitor); | 179 EmptyChromeClient::Trace(visitor); |
181 } | 180 } |
182 | 181 |
183 void SetCursor(const Cursor& cursor, LocalFrame* local_root) override { | 182 void SetCursor(const Cursor& cursor, LocalFrame* local_root) override { |
184 ToChromeClientImpl(client_)->SetCursorOverridden(false); | 183 client_->SetCursorOverridden(false); |
185 ToChromeClientImpl(client_)->SetCursor(cursor, | 184 client_->SetCursor(cursor, overlay_->frame_impl_->GetFrame()); |
186 overlay_->frame_impl_->GetFrame()); | 185 client_->SetCursorOverridden(false); |
187 ToChromeClientImpl(client_)->SetCursorOverridden(false); | |
188 } | 186 } |
189 | 187 |
190 void SetToolTip(LocalFrame& frame, | 188 void SetToolTip(LocalFrame& frame, |
191 const String& tooltip, | 189 const String& tooltip, |
192 TextDirection direction) override { | 190 TextDirection direction) override { |
193 DCHECK_EQ(&frame, overlay_->OverlayMainFrame()); | 191 DCHECK_EQ(&frame, overlay_->OverlayMainFrame()); |
194 client_->SetToolTip(*overlay_->frame_impl_->GetFrame(), tooltip, direction); | 192 client_->SetToolTip(*overlay_->frame_impl_->GetFrame(), tooltip, direction); |
195 } | 193 } |
196 | 194 |
197 void InvalidateRect(const IntRect&) override { overlay_->Invalidate(); } | 195 void InvalidateRect(const IntRect&) override { overlay_->Invalidate(); } |
(...skipping 977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1175 InspectorDOMAgent::ParseColor(config->getShapeColor(nullptr)); | 1173 InspectorDOMAgent::ParseColor(config->getShapeColor(nullptr)); |
1176 highlight_config->shape_margin = | 1174 highlight_config->shape_margin = |
1177 InspectorDOMAgent::ParseColor(config->getShapeMarginColor(nullptr)); | 1175 InspectorDOMAgent::ParseColor(config->getShapeMarginColor(nullptr)); |
1178 highlight_config->selector_list = config->getSelectorList(""); | 1176 highlight_config->selector_list = config->getSelectorList(""); |
1179 | 1177 |
1180 *out_config = std::move(highlight_config); | 1178 *out_config = std::move(highlight_config); |
1181 return Response::OK(); | 1179 return Response::OK(); |
1182 } | 1180 } |
1183 | 1181 |
1184 } // namespace blink | 1182 } // namespace blink |
OLD | NEW |