Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Side by Side Diff: third_party/WebKit/Source/web/WebDevToolsAgentImpl.cpp

Issue 2218603003: Timeline: show white overlay till page being reloaded paints (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: No message, just blanket Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010-2011 Google Inc. All rights reserved. 2 * Copyright (C) 2010-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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 , m_instrumentingAgents(m_webLocalFrameImpl->frame()->instrumentingAgents()) 316 , m_instrumentingAgents(m_webLocalFrameImpl->frame()->instrumentingAgents())
317 , m_resourceContentLoader(InspectorResourceContentLoader::create(m_webLocalF rameImpl->frame())) 317 , m_resourceContentLoader(InspectorResourceContentLoader::create(m_webLocalF rameImpl->frame()))
318 , m_overlay(overlay) 318 , m_overlay(overlay)
319 , m_inspectedFrames(InspectedFrames::create(m_webLocalFrameImpl->frame())) 319 , m_inspectedFrames(InspectedFrames::create(m_webLocalFrameImpl->frame()))
320 , m_resourceContainer(new InspectorResourceContainer(m_inspectedFrames)) 320 , m_resourceContainer(new InspectorResourceContainer(m_inspectedFrames))
321 , m_domAgent(nullptr) 321 , m_domAgent(nullptr)
322 , m_pageAgent(nullptr) 322 , m_pageAgent(nullptr)
323 , m_networkAgent(nullptr) 323 , m_networkAgent(nullptr)
324 , m_layerTreeAgent(nullptr) 324 , m_layerTreeAgent(nullptr)
325 , m_tracingAgent(nullptr) 325 , m_tracingAgent(nullptr)
326 , m_layerTreeId(0)
326 , m_includeViewAgents(includeViewAgents) 327 , m_includeViewAgents(includeViewAgents)
327 , m_layerTreeId(0) 328 , m_tracingActive(false)
328 { 329 {
329 DCHECK(isMainThread()); 330 DCHECK(isMainThread());
330 DCHECK(m_webLocalFrameImpl->frame()); 331 DCHECK(m_webLocalFrameImpl->frame());
331 } 332 }
332 333
333 WebDevToolsAgentImpl::~WebDevToolsAgentImpl() 334 WebDevToolsAgentImpl::~WebDevToolsAgentImpl()
334 { 335 {
335 DCHECK(!m_client); 336 DCHECK(!m_client);
336 } 337 }
337 338
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 if (m_layerTreeAgent) 515 if (m_layerTreeAgent)
515 m_layerTreeAgent->willAddPageOverlay(layer); 516 m_layerTreeAgent->willAddPageOverlay(layer);
516 } 517 }
517 518
518 void WebDevToolsAgentImpl::didRemovePageOverlay(const GraphicsLayer* layer) 519 void WebDevToolsAgentImpl::didRemovePageOverlay(const GraphicsLayer* layer)
519 { 520 {
520 if (m_layerTreeAgent) 521 if (m_layerTreeAgent)
521 m_layerTreeAgent->didRemovePageOverlay(layer); 522 m_layerTreeAgent->didRemovePageOverlay(layer);
522 } 523 }
523 524
525 void WebDevToolsAgentImpl::rootLayerCleared()
526 {
527 if (m_overlay)
528 m_overlay->maybeClearReloadingBlanket();
529 }
530
524 void WebDevToolsAgentImpl::layerTreeViewChanged(WebLayerTreeView* layerTreeView) 531 void WebDevToolsAgentImpl::layerTreeViewChanged(WebLayerTreeView* layerTreeView)
525 { 532 {
526 m_layerTreeId = layerTreeView ? layerTreeView->layerTreeId() : 0; 533 m_layerTreeId = layerTreeView ? layerTreeView->layerTreeId() : 0;
527 if (m_tracingAgent) 534 if (m_tracingAgent)
528 m_tracingAgent->setLayerTreeId(m_layerTreeId); 535 m_tracingAgent->setLayerTreeId(m_layerTreeId);
529 } 536 }
530 537
531 void WebDevToolsAgentImpl::enableTracing(const String& categoryFilter) 538 void WebDevToolsAgentImpl::enableTracing(const String& categoryFilter)
532 { 539 {
533 if (m_client) 540 if (m_client)
534 m_client->enableTracing(categoryFilter); 541 m_client->enableTracing(categoryFilter);
542 m_tracingActive = true;
535 } 543 }
536 544
537 void WebDevToolsAgentImpl::disableTracing() 545 void WebDevToolsAgentImpl::disableTracing()
538 { 546 {
539 if (m_client) 547 if (m_client)
540 m_client->disableTracing(); 548 m_client->disableTracing();
549 m_tracingActive = false;
550 }
551
552 void WebDevToolsAgentImpl::willReloadPage()
553 {
554 if (m_overlay && m_tracingActive)
555 m_overlay->showReloadingBlanket();
541 } 556 }
542 557
543 void WebDevToolsAgentImpl::setCPUThrottlingRate(double rate) 558 void WebDevToolsAgentImpl::setCPUThrottlingRate(double rate)
544 { 559 {
545 if (m_client) 560 if (m_client)
546 m_client->setCPUThrottlingRate(rate); 561 m_client->setCPUThrottlingRate(rate);
547 } 562 }
548 563
549 void WebDevToolsAgentImpl::dispatchOnInspectorBackend(int sessionId, int callId, const WebString& method, const WebString& message) 564 void WebDevToolsAgentImpl::dispatchOnInspectorBackend(int sessionId, int callId, const WebString& method, const WebString& message)
550 { 565 {
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 bool WebDevToolsAgent::shouldInterruptForMethod(const WebString& method) 684 bool WebDevToolsAgent::shouldInterruptForMethod(const WebString& method)
670 { 685 {
671 return method == "Debugger.pause" 686 return method == "Debugger.pause"
672 || method == "Debugger.setBreakpoint" 687 || method == "Debugger.setBreakpoint"
673 || method == "Debugger.setBreakpointByUrl" 688 || method == "Debugger.setBreakpointByUrl"
674 || method == "Debugger.removeBreakpoint" 689 || method == "Debugger.removeBreakpoint"
675 || method == "Debugger.setBreakpointsActive"; 690 || method == "Debugger.setBreakpointsActive";
676 } 691 }
677 692
678 } // namespace blink 693 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698