save devtools zoom level preference

This commit is contained in:
Robo 2015-07-27 20:04:21 +05:30
parent bd6019ba0d
commit a56a0505fa
2 changed files with 32 additions and 12 deletions

View file

@ -19,6 +19,7 @@
#include "net/url_request/url_fetcher_delegate.h"
#include "ui/gfx/geometry/rect.h"
class PrefService;
class PrefRegistrySimple;
namespace content {
@ -65,6 +66,10 @@ class InspectableWebContentsImpl :
gfx::Rect GetDevToolsBounds() const;
void SaveDevToolsBounds(const gfx::Rect& bounds);
// Return the last set zoom level of devtools window.
double GetDevToolsZoomLevel() const;
void UpdateDevToolsZoomLevel(double level);
private:
// DevToolsEmbedderMessageDispacher::Delegate
void ActivateWindow() override;
@ -160,6 +165,8 @@ class InspectableWebContentsImpl :
PendingRequestsMap pending_requests_;
InspectableWebContentsDelegate* delegate_; // weak references.
PrefService* pref_service_; // weak reference.
scoped_ptr<content::WebContents> web_contents_;
scoped_ptr<content::WebContents> devtools_web_contents_;
scoped_ptr<InspectableWebContentsView> view_;