Chromium Code Reviews| Index: content/browser/debugger/devtools_window.cc |
| diff --git a/content/browser/debugger/devtools_window.cc b/content/browser/debugger/devtools_window.cc |
| index ba633243a70139c39ad1e464e43ead12f04f45bc..c231568fed70ab0a3a7135c426feb2e2383dbbcb 100644 |
| --- a/content/browser/debugger/devtools_window.cc |
| +++ b/content/browser/debugger/devtools_window.cc |
| @@ -74,6 +74,12 @@ DevToolsWindow* DevToolsWindow::FindDevToolsWindow( |
| } |
| // static |
| +DevToolsWindow* DevToolsWindow::CreateDevToolsWindowForWorker( |
| + Profile* profile) { |
| + return new DevToolsWindow(profile, NULL, false); |
| +} |
| + |
| +// static |
| DevToolsWindow* DevToolsWindow::OpenDevToolsWindow( |
| RenderViewHost* inspected_rvh) { |
| return ToggleDevToolsWindow(inspected_rvh, true, |
| @@ -130,10 +136,12 @@ DevToolsWindow::DevToolsWindow(Profile* profile, |
| this, |
| NotificationType::BROWSER_THEME_CHANGED, |
| Source<ThemeService>(ThemeServiceFactory::GetForProfile(profile_))); |
| - TabContents* tab = inspected_rvh->delegate()->GetAsTabContents(); |
| - if (tab) |
| - inspected_tab_ = TabContentsWrapper::GetCurrentWrapperForContents(tab); |
| - |
| + // There is now inspected_rvh in case of shared workers. |
|
pfeldman
2011/07/11 12:07:16
There is _no_ inspected_rvh ?
yurys
2011/07/11 15:13:11
Done.
|
| + if (inspected_rvh) { |
| + TabContents* tab = inspected_rvh->delegate()->GetAsTabContents(); |
| + if (tab) |
| + inspected_tab_ = TabContentsWrapper::GetCurrentWrapperForContents(tab); |
| + } |
| instances_.push_back(this); |
| } |