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

Side by Side Diff: webkit/glue/webdevtoolsagent_impl.cc

Issue 434080: DevTools: provisional implementation of new methods in WebDevToolsAgent (Closed)
Patch Set: Rebase Created 11 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "config.h" 5 #include "config.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "Document.h" 9 #include "Document.h"
10 #include "EventListener.h" 10 #include "EventListener.h"
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 return page->inspectorController(); 478 return page->inspectorController();
479 return NULL; 479 return NULL;
480 } 480 }
481 481
482 482
483 //------- plugin resource load notifications --------------- 483 //------- plugin resource load notifications ---------------
484 void WebDevToolsAgentImpl::identifierForInitialRequest( 484 void WebDevToolsAgentImpl::identifierForInitialRequest(
485 unsigned long resourceId, 485 unsigned long resourceId,
486 WebKit::WebFrame* frame, 486 WebKit::WebFrame* frame,
487 const WebURLRequest& request) { 487 const WebURLRequest& request) {
488 if (InspectorController* ic = GetInspectorController()) {
489 WebFrameImpl* web_frame_impl = static_cast<WebFrameImpl*>(frame);
490 FrameLoader* frame_loader = web_frame_impl->frame()->loader();
491 DocumentLoader* loader = frame_loader->activeDocumentLoader();
492 ic->identifierForInitialRequest(resourceId, loader,
493 request.toResourceRequest());
494 }
488 } 495 }
489 496
490 void WebDevToolsAgentImpl::willSendRequest( 497 void WebDevToolsAgentImpl::willSendRequest(
491 unsigned long resourceId, 498 unsigned long resourceId,
492 const WebURLRequest& request) { 499 const WebURLRequest& request) {
500 if (InspectorController* ic = GetInspectorController()) {
501 ic->willSendRequest(resourceId, request.toResourceRequest(),
502 ResourceResponse());
503 }
493 } 504 }
494 505
495 void WebDevToolsAgentImpl::didReceiveData(unsigned long resourceId, 506 void WebDevToolsAgentImpl::didReceiveData(unsigned long resourceId,
496 int length) { 507 int length) {
508 if (InspectorController* ic = GetInspectorController())
509 ic->didReceiveContentLength(resourceId, length);
497 } 510 }
498 511
499 void WebDevToolsAgentImpl::didReceiveResponse( 512 void WebDevToolsAgentImpl::didReceiveResponse(
500 unsigned long resourceId, 513 unsigned long resourceId,
501 const WebURLResponse& response) { 514 const WebURLResponse& response) {
515 if (InspectorController* ic = GetInspectorController())
516 ic->didReceiveResponse(resourceId, response.toResourceResponse());
502 } 517 }
503 518
504 void WebDevToolsAgentImpl::didFinishLoading( 519 void WebDevToolsAgentImpl::didFinishLoading(
505 unsigned long resourceId) { 520 unsigned long resourceId) {
521 if (InspectorController* ic = GetInspectorController()) {
522 ic->didFinishLoading(resourceId);
523 }
506 } 524 }
507 525
508 void WebDevToolsAgentImpl::didFailLoading(unsigned long resourceId, 526 void WebDevToolsAgentImpl::didFailLoading(unsigned long resourceId,
509 const WebURLError& error) { 527 const WebURLError& error) {
528 ResourceError resource_error;
529 if (InspectorController* ic = GetInspectorController())
530 ic->didFailLoading(resourceId, resource_error);
510 } 531 }
511 532
512 533
513 namespace WebKit { 534 namespace WebKit {
514 535
515 // static 536 // static
516 WebDevToolsAgent* WebDevToolsAgent::create(WebView* webview, 537 WebDevToolsAgent* WebDevToolsAgent::create(WebView* webview,
517 WebDevToolsAgentClient* client) { 538 WebDevToolsAgentClient* client) {
518 return new WebDevToolsAgentImpl(static_cast<WebViewImpl*>(webview), client); 539 return new WebDevToolsAgentImpl(static_cast<WebViewImpl*>(webview), client);
519 } 540 }
(...skipping 11 matching lines...) Expand all
531 DebuggerAgentManager::PauseScript(); 552 DebuggerAgentManager::PauseScript();
532 } 553 }
533 554
534 // static 555 // static
535 void WebDevToolsAgent::setMessageLoopDispatchHandler( 556 void WebDevToolsAgent::setMessageLoopDispatchHandler(
536 MessageLoopDispatchHandler handler) { 557 MessageLoopDispatchHandler handler) {
537 DebuggerAgentManager::SetMessageLoopDispatchHandler(handler); 558 DebuggerAgentManager::SetMessageLoopDispatchHandler(handler);
538 } 559 }
539 560
540 } // namespace WebKit 561 } // namespace WebKit
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698