mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Remove CefBrowserHost::GetDevToolsURL(). It is now possible to use DevTools without remote debugging, and the ability to load a remote debugging URL without first loading the discovery page is no longer supported (issue #659).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1511 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@ -1,41 +0,0 @@
|
||||
Index: browser/devtools/devtools_http_handler_impl.cc
|
||||
===================================================================
|
||||
--- browser/devtools/devtools_http_handler_impl.cc (revision 231322)
|
||||
+++ browser/devtools/devtools_http_handler_impl.cc (working copy)
|
||||
@@ -550,9 +550,16 @@
|
||||
|
||||
DevToolsTarget* DevToolsHttpHandlerImpl::GetTarget(const std::string& id) {
|
||||
TargetMap::const_iterator it = target_map_.find(id);
|
||||
- if (it == target_map_.end())
|
||||
+ if (it != target_map_.end())
|
||||
+ return it->second;
|
||||
+
|
||||
+ scoped_ptr<DevToolsTarget> target(delegate_->CreateTargetForId(id));
|
||||
+ if (!target)
|
||||
return NULL;
|
||||
- return it->second;
|
||||
+
|
||||
+ DCHECK_EQ(id, target->GetId());
|
||||
+ target_map_[id] = target.release();
|
||||
+ return target_map_[id];
|
||||
}
|
||||
|
||||
void DevToolsHttpHandlerImpl::OnThumbnailRequestUI(
|
||||
Index: public/browser/devtools_http_handler_delegate.h
|
||||
===================================================================
|
||||
--- public/browser/devtools_http_handler_delegate.h (revision 231322)
|
||||
+++ public/browser/devtools_http_handler_delegate.h (working copy)
|
||||
@@ -39,6 +39,13 @@
|
||||
// Creates new inspectable target.
|
||||
virtual scoped_ptr<DevToolsTarget> CreateNewTarget(const GURL& url) = 0;
|
||||
|
||||
+ // Creates an inspectable target for the specified |id|. Called in cases where
|
||||
+ // the target has not been enumerated (for example, direct URL access where
|
||||
+ // the discovery JSON was not loaded first). This method was added for
|
||||
+ // Chromium Embedded Framework.
|
||||
+ virtual scoped_ptr<DevToolsTarget> CreateTargetForId(
|
||||
+ const std::string& id) = 0;
|
||||
+
|
||||
typedef std::vector<DevToolsTarget*> TargetList;
|
||||
typedef base::Callback<void(const TargetList&)> TargetCallback;
|
||||
|
Reference in New Issue
Block a user