b2a79856ef
This class can be used to create a content::WebContents that can be inspected by the Chrome Dev Tools. This requires embedding applications to copy content_shell.pak into their resource bundle. Right now the dev tools are always docked to the bottom of the view; we don't yet support undocking or changing the docked side. Fixes #1.
44 lines
1.1 KiB
C++
44 lines
1.1 KiB
C++
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE-CHROMIUM file.
|
|
|
|
#ifndef BRIGHTRAY_BROWSER_BROWSER_MAIN_PARTS_H_
|
|
#define BRIGHTRAY_BROWSER_BROWSER_MAIN_PARTS_H_
|
|
|
|
#include "base/compiler_specific.h"
|
|
#include "base/memory/scoped_ptr.h"
|
|
#include "content/public/browser/browser_main_parts.h"
|
|
|
|
namespace content {
|
|
class DevToolsHttpHandler;
|
|
}
|
|
|
|
namespace brightray {
|
|
|
|
class BrowserContext;
|
|
|
|
class BrowserMainParts : public content::BrowserMainParts {
|
|
public:
|
|
BrowserMainParts();
|
|
~BrowserMainParts();
|
|
|
|
BrowserContext* browser_context() { return browser_context_.get(); }
|
|
content::DevToolsHttpHandler* devtools_http_handler() { return devtools_http_handler_; }
|
|
|
|
protected:
|
|
#if defined(OS_MACOSX)
|
|
virtual void PreMainMessageLoopStart() OVERRIDE;
|
|
#endif
|
|
|
|
virtual void PreMainMessageLoopRun() OVERRIDE;
|
|
|
|
private:
|
|
scoped_ptr<BrowserContext> browser_context_;
|
|
content::DevToolsHttpHandler* devtools_http_handler_;
|
|
|
|
DISALLOW_COPY_AND_ASSIGN(BrowserMainParts);
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|