| 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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 | 189 |
| 190 void SetToolTip(LocalFrame& frame, | 190 void SetToolTip(LocalFrame& frame, |
| 191 const String& tooltip, | 191 const String& tooltip, |
| 192 TextDirection direction) override { | 192 TextDirection direction) override { |
| 193 DCHECK_EQ(&frame, overlay_->OverlayMainFrame()); | 193 DCHECK_EQ(&frame, overlay_->OverlayMainFrame()); |
| 194 client_->SetToolTip(*overlay_->frame_impl_->GetFrame(), tooltip, direction); | 194 client_->SetToolTip(*overlay_->frame_impl_->GetFrame(), tooltip, direction); |
| 195 } | 195 } |
| 196 | 196 |
| 197 void InvalidateRect(const IntRect&) override { overlay_->Invalidate(); } | 197 void InvalidateRect(const IntRect&) override { overlay_->Invalidate(); } |
| 198 | 198 |
| 199 void ScheduleAnimation(LocalFrame* frame) override { | 199 void ScheduleAnimation(const PlatformFrameView* frame_view) override { |
| 200 if (overlay_->in_layout_) | 200 if (overlay_->in_layout_) |
| 201 return; | 201 return; |
| 202 | 202 |
| 203 client_->ScheduleAnimation(frame); | 203 client_->ScheduleAnimation(frame_view); |
| 204 } | 204 } |
| 205 | 205 |
| 206 private: | 206 private: |
| 207 InspectorOverlayChromeClient(ChromeClient& client, | 207 InspectorOverlayChromeClient(ChromeClient& client, |
| 208 InspectorOverlayAgent& overlay) | 208 InspectorOverlayAgent& overlay) |
| 209 : client_(&client), overlay_(&overlay) {} | 209 : client_(&client), overlay_(&overlay) {} |
| 210 | 210 |
| 211 Member<ChromeClient> client_; | 211 Member<ChromeClient> client_; |
| 212 Member<InspectorOverlayAgent> overlay_; | 212 Member<InspectorOverlayAgent> overlay_; |
| 213 }; | 213 }; |
| (...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 671 | 671 |
| 672 void InspectorOverlayAgent::ScheduleUpdate() { | 672 void InspectorOverlayAgent::ScheduleUpdate() { |
| 673 if (IsEmpty()) { | 673 if (IsEmpty()) { |
| 674 if (page_overlay_) | 674 if (page_overlay_) |
| 675 page_overlay_.reset(); | 675 page_overlay_.reset(); |
| 676 return; | 676 return; |
| 677 } | 677 } |
| 678 needs_update_ = true; | 678 needs_update_ = true; |
| 679 LocalFrame* frame = frame_impl_->GetFrame(); | 679 LocalFrame* frame = frame_impl_->GetFrame(); |
| 680 if (frame) { | 680 if (frame) { |
| 681 frame->GetPage()->GetChromeClient().ScheduleAnimation(frame); | 681 frame->GetPage()->GetChromeClient().ScheduleAnimation(frame->View()); |
| 682 } | 682 } |
| 683 } | 683 } |
| 684 | 684 |
| 685 void InspectorOverlayAgent::RebuildOverlayPage() { | 685 void InspectorOverlayAgent::RebuildOverlayPage() { |
| 686 FrameView* view = frame_impl_->GetFrameView(); | 686 FrameView* view = frame_impl_->GetFrameView(); |
| 687 LocalFrame* frame = frame_impl_->GetFrame(); | 687 LocalFrame* frame = frame_impl_->GetFrame(); |
| 688 if (!view || !frame) | 688 if (!view || !frame) |
| 689 return; | 689 return; |
| 690 | 690 |
| 691 IntRect visible_rect_in_document = | 691 IntRect visible_rect_in_document = |
| (...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1175 InspectorDOMAgent::ParseColor(config->getShapeColor(nullptr)); | 1175 InspectorDOMAgent::ParseColor(config->getShapeColor(nullptr)); |
| 1176 highlight_config->shape_margin = | 1176 highlight_config->shape_margin = |
| 1177 InspectorDOMAgent::ParseColor(config->getShapeMarginColor(nullptr)); | 1177 InspectorDOMAgent::ParseColor(config->getShapeMarginColor(nullptr)); |
| 1178 highlight_config->selector_list = config->getSelectorList(""); | 1178 highlight_config->selector_list = config->getSelectorList(""); |
| 1179 | 1179 |
| 1180 *out_config = std::move(highlight_config); | 1180 *out_config = std::move(highlight_config); |
| 1181 return Response::OK(); | 1181 return Response::OK(); |
| 1182 } | 1182 } |
| 1183 | 1183 |
| 1184 } // namespace blink | 1184 } // namespace blink |
| OLD | NEW |