Implement GetDevToolsManagerDelegate, fixes atom/atom-shell#969

This commit is contained in:
Cheng Zhao 2015-01-02 15:18:24 -08:00
parent ad81698651
commit 51ef072de5
2 changed files with 12 additions and 6 deletions

View file

@ -6,6 +6,7 @@
#include "browser/browser_context.h" #include "browser/browser_context.h"
#include "browser/browser_main_parts.h" #include "browser/browser_main_parts.h"
#include "browser/devtools_delegate.h"
#include "browser/media/media_capture_devices_dispatcher.h" #include "browser/media/media_capture_devices_dispatcher.h"
#include "browser/notification_presenter.h" #include "browser/notification_presenter.h"
@ -95,4 +96,8 @@ base::FilePath BrowserClient::GetDefaultDownloadDirectory() {
return path; return path;
} }
content::DevToolsManagerDelegate* BrowserClient::GetDevToolsManagerDelegate() {
return new DevToolsManagerDelegate(browser_context());
}
} // namespace brightray } // namespace brightray

View file

@ -33,23 +33,24 @@ class BrowserClient : public content::ContentBrowserClient {
// Subclasses that override this (e.g., to provide their own protocol // Subclasses that override this (e.g., to provide their own protocol
// handlers) should call this implementation after doing their own work. // handlers) should call this implementation after doing their own work.
virtual net::URLRequestContextGetter* CreateRequestContext( net::URLRequestContextGetter* CreateRequestContext(
content::BrowserContext* browser_context, content::BrowserContext* browser_context,
content::ProtocolHandlerMap* protocol_handlers, content::ProtocolHandlerMap* protocol_handlers,
content::URLRequestInterceptorScopedVector protocol_interceptors) override; content::URLRequestInterceptorScopedVector protocol_interceptors) override;
private: private:
virtual content::BrowserMainParts* CreateBrowserMainParts( content::BrowserMainParts* CreateBrowserMainParts(
const content::MainFunctionParams&) override; const content::MainFunctionParams&) override;
virtual void ShowDesktopNotification( void ShowDesktopNotification(
const content::ShowDesktopNotificationHostMsgParams& params, const content::ShowDesktopNotificationHostMsgParams& params,
content::RenderFrameHost* render_frame_host, content::RenderFrameHost* render_frame_host,
scoped_ptr<content::DesktopNotificationDelegate> delegate, scoped_ptr<content::DesktopNotificationDelegate> delegate,
base::Closure* cancel_callback) override; base::Closure* cancel_callback) override;
virtual content::MediaObserver* GetMediaObserver() override; content::MediaObserver* GetMediaObserver() override;
virtual void GetAdditionalAllowedSchemesForFileSystem( void GetAdditionalAllowedSchemesForFileSystem(
std::vector<std::string>* additional_schemes) override; std::vector<std::string>* additional_schemes) override;
virtual base::FilePath GetDefaultDownloadDirectory() override; base::FilePath GetDefaultDownloadDirectory() override;
content::DevToolsManagerDelegate* GetDevToolsManagerDelegate() override;
BrowserMainParts* browser_main_parts_; BrowserMainParts* browser_main_parts_;
scoped_ptr<NotificationPresenter> notification_presenter_; scoped_ptr<NotificationPresenter> notification_presenter_;