The DevTools window should manage lifetime itself.
This commit is contained in:
parent
eaedac2536
commit
f65f95e95c
4 changed files with 19 additions and 12 deletions
|
@ -185,16 +185,14 @@ void NativeWindow::InspectElement(int x, int y) {
|
|||
agent->InspectElement(x, y);
|
||||
}
|
||||
|
||||
scoped_ptr<NativeWindow> NativeWindow::DebugDevTools() {
|
||||
scoped_ptr<NativeWindow> window;
|
||||
if (IsDevToolsOpened()) {
|
||||
base::DictionaryValue options;
|
||||
window.reset(NativeWindow::Create(&options));
|
||||
window->devtools_delegate_.reset(new DevToolsDelegate(
|
||||
window.get(), GetDevToolsWebContents()));
|
||||
}
|
||||
void NativeWindow::DebugDevTools() {
|
||||
if (!IsDevToolsOpened())
|
||||
return;
|
||||
|
||||
return window.Pass();
|
||||
base::DictionaryValue options;
|
||||
NativeWindow* window = NativeWindow::Create(&options);
|
||||
window->devtools_delegate_.reset(new DevToolsDelegate(
|
||||
window, GetDevToolsWebContents()));
|
||||
}
|
||||
|
||||
void NativeWindow::FocusOnWebView() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue