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

Unified Diff: apps/shell/browser/shell_browser_main_parts.cc

Issue 147993009: [App Shell] Add dev tools for debugging (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: apps/shell/browser/shell_browser_main_parts.cc
diff --git a/apps/shell/browser/shell_browser_main_parts.cc b/apps/shell/browser/shell_browser_main_parts.cc
index 9afadd09a0bdc0418ff079e5e8c2982faf4ec28f..da87208399c575512c4a8028dad608d797022831 100644
--- a/apps/shell/browser/shell_browser_main_parts.cc
+++ b/apps/shell/browser/shell_browser_main_parts.cc
@@ -15,6 +15,7 @@
#include "base/run_loop.h"
#include "components/browser_context_keyed_service/browser_context_dependency_manager.h"
#include "content/public/common/result_codes.h"
+#include "content/shell/browser/shell_devtools_delegate.h"
#include "extensions/browser/extension_system.h"
#include "extensions/browser/renderer_startup_helper.h"
#include "ui/aura/env.h"
@@ -113,6 +114,9 @@ void ShellBrowserMainParts::PreMainMessageLoopRun() {
BrowserContextDependencyManager::GetInstance()->CreateBrowserContextServices(
browser_context_.get());
+ devtools_delegate_.reset(
+ new content::ShellDevToolsDelegate(browser_context_.get()));
+
CreateRootWindow();
CreateViewsDelegate();
@@ -138,6 +142,8 @@ bool ShellBrowserMainParts::MainMessageLoopRun(int* result_code) {
}
void ShellBrowserMainParts::PostMainMessageLoopRun() {
+ if (devtools_delegate_)
James Cook 2014/02/10 20:31:23 Why do you need the if()? It looks like it should
Haojian Wu 2014/02/11 03:24:36 Yes, in this code logic, it's always valid (it get
James Cook 2014/02/11 17:11:16 I wouldn't do the if() because it confuses the rea
+ devtools_delegate_->Stop();
DestroyViewsDelegate();
DestroyRootWindow();
BrowserContextDependencyManager::GetInstance()->DestroyBrowserContextServices(
« apps/shell/app/shell_main_delegate.cc ('K') | « apps/shell/browser/shell_browser_main_parts.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698