Remember where the dev tools were docked between launches
This commit is contained in:
parent
a2a2cd1936
commit
3c513d6ae8
5 changed files with 62 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
|||
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
||||
// Copyright (c) 2013 Adam Roben <adam@roben.org>. 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_INSPECTABLE_WEB_CONTENTS_IMPL_H_
|
||||
#define BRIGHTRAY_BROWSER_INSPECTABLE_WEB_CONTENTS_IMPL_H_
|
||||
|
||||
|
@ -7,6 +12,8 @@
|
|||
#include "content/public/browser/web_contents_delegate.h"
|
||||
#include "content/public/browser/web_contents_observer.h"
|
||||
|
||||
class PrefRegistrySimple;
|
||||
|
||||
namespace content {
|
||||
class DevToolsAgentHost;
|
||||
class DevToolsClientHost;
|
||||
|
@ -22,6 +29,8 @@ class InspectableWebContentsImpl :
|
|||
content::WebContentsObserver,
|
||||
content::WebContentsDelegate {
|
||||
public:
|
||||
static void RegisterPrefs(PrefRegistrySimple*);
|
||||
|
||||
InspectableWebContentsImpl(const content::WebContents::CreateParams&);
|
||||
virtual ~InspectableWebContentsImpl() OVERRIDE;
|
||||
|
||||
|
@ -33,6 +42,8 @@ public:
|
|||
content::WebContents* devtools_web_contents() { return devtools_web_contents_.get(); }
|
||||
|
||||
private:
|
||||
void UpdateFrontendDockSide();
|
||||
|
||||
// content::DevToolsFrontendHostDelegate
|
||||
|
||||
virtual void ActivateWindow() OVERRIDE;
|
||||
|
@ -54,6 +65,10 @@ private:
|
|||
// content::WebContentsObserver
|
||||
|
||||
virtual void RenderViewCreated(content::RenderViewHost*) OVERRIDE;
|
||||
virtual void DidFinishLoad(int64 frame_id,
|
||||
const GURL& validated_url,
|
||||
bool is_main_frame,
|
||||
content::RenderViewHost*) OVERRIDE;
|
||||
virtual void WebContentsDestroyed(content::WebContents*) OVERRIDE;
|
||||
|
||||
// content::WebContentsDelegate
|
||||
|
@ -65,6 +80,7 @@ private:
|
|||
scoped_ptr<InspectableWebContentsView> view_;
|
||||
scoped_refptr<content::DevToolsAgentHost> agent_host_;
|
||||
scoped_ptr<content::DevToolsClientHost> frontend_host_;
|
||||
std::string dock_side_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(InspectableWebContentsImpl);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue