Move devtools API to WebContents

This commit is contained in:
Cheng Zhao 2015-10-01 11:14:19 +08:00
parent 0fb68e8130
commit 83c514001e
12 changed files with 97 additions and 89 deletions

View file

@ -12,6 +12,7 @@
#include "brightray/browser/default_web_contents_delegate.h"
#include "brightray/browser/inspectable_web_contents_impl.h"
#include "brightray/browser/inspectable_web_contents_delegate.h"
#include "brightray/browser/inspectable_web_contents_view_delegate.h"
namespace atom {
@ -21,7 +22,8 @@ class WebDialogHelper;
class CommonWebContentsDelegate
: public brightray::DefaultWebContentsDelegate,
public brightray::InspectableWebContentsDelegate {
public brightray::InspectableWebContentsDelegate,
public brightray::InspectableWebContentsViewDelegate {
public:
CommonWebContentsDelegate();
virtual ~CommonWebContentsDelegate();
@ -86,6 +88,15 @@ class CommonWebContentsDelegate
void DevToolsRemoveFileSystem(
const base::FilePath& file_system_path) override;
// brightray::InspectableWebContentsViewDelegate:
#if defined(TOOLKIT_VIEWS)
gfx::ImageSkia GetDevToolsWindowIcon() override;
#endif
#if defined(USE_X11)
void GetDevToolsWindowWMClass(
std::string* name, std::string* class_name) override;
#endif
private:
// Callback for when DevToolsSaveToFile has completed.
void OnDevToolsSaveToFile(const std::string& url);