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

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

Issue 113836: DevTools: introduce bound object on the agent side. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « webkit/glue/webframeloaderclient_impl.cc ('k') | webkit/webkit.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2007 Google Inc. All Rights Reserved. 2 * Copyright 2007 Google Inc. All Rights Reserved.
3 * 3 *
4 * Portions Copyright (C) 2006 Apple Computer, Inc. All rights reserved. 4 * Portions Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
5 * 5 *
6 * ***** BEGIN LICENSE BLOCK ***** 6 * ***** BEGIN LICENSE BLOCK *****
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
(...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after
899 if (!frame) 899 if (!frame)
900 return true; 900 return true;
901 901
902 return frame->shouldClose(); 902 return frame->shouldClose();
903 } 903 }
904 904
905 void WebViewImpl::Close() { 905 void WebViewImpl::Close() {
906 // Do this first to prevent reentrant notifications from being sent to the 906 // Do this first to prevent reentrant notifications from being sent to the
907 // initiator of the close. 907 // initiator of the close.
908 delegate_ = NULL; 908 delegate_ = NULL;
909 devtools_agent_.reset(NULL);
910 909
911 if (page_.get()) { 910 if (page_.get()) {
912 // Initiate shutdown for the entire frameset. This will cause a lot of 911 // Initiate shutdown for the entire frameset. This will cause a lot of
913 // notifications to be sent. 912 // notifications to be sent.
914 if (page_->mainFrame()) 913 if (page_->mainFrame())
915 page_->mainFrame()->loader()->frameDetached(); 914 page_->mainFrame()->loader()->frameDetached();
916 page_.reset(); 915 page_.reset();
917 } 916 }
917
918 // Should happen after page_.reset().
919 devtools_agent_.reset(NULL);
918 920
919 Release(); // Balances AddRef from WebView::Create 921 Release(); // Balances AddRef from WebView::Create
920 } 922 }
921 923
922 WebViewDelegate* WebViewImpl::GetDelegate() { 924 WebViewDelegate* WebViewImpl::GetDelegate() {
923 return delegate_; 925 return delegate_;
924 } 926 }
925 927
926 void WebViewImpl::SetDelegate(WebViewDelegate* delegate) { 928 void WebViewImpl::SetDelegate(WebViewDelegate* delegate) {
927 delegate_ = delegate; 929 delegate_ = delegate;
(...skipping 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after
1951 1953
1952 return document->focusedNode(); 1954 return document->focusedNode();
1953 } 1955 }
1954 1956
1955 HitTestResult WebViewImpl::HitTestResultForWindowPos(const IntPoint& pos) { 1957 HitTestResult WebViewImpl::HitTestResultForWindowPos(const IntPoint& pos) {
1956 IntPoint doc_point( 1958 IntPoint doc_point(
1957 page_->mainFrame()->view()->windowToContents(pos)); 1959 page_->mainFrame()->view()->windowToContents(pos));
1958 return page_->mainFrame()->eventHandler()-> 1960 return page_->mainFrame()->eventHandler()->
1959 hitTestResultAtPoint(doc_point, false); 1961 hitTestResultAtPoint(doc_point, false);
1960 } 1962 }
OLDNEW
« no previous file with comments | « webkit/glue/webframeloaderclient_impl.cc ('k') | webkit/webkit.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698