Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(754)

Unified Diff: content/browser/devtools/protocol/emulation_handler.h

Issue 1014403002: [DevTools] Emulation domain implementation (browser side). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nullptr Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/devtools/protocol/emulation_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/devtools/protocol/emulation_handler.h
diff --git a/content/browser/devtools/protocol/emulation_handler.h b/content/browser/devtools/protocol/emulation_handler.h
index 8f152d37c020e4881dd1fa4ae2da734a9df42c5a..8f14b2f66b918e4df1d838c4138a12bd6ec32811 100644
--- a/content/browser/devtools/protocol/emulation_handler.h
+++ b/content/browser/devtools/protocol/emulation_handler.h
@@ -6,17 +6,31 @@
#define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_EMULATION_HANDLER_H_
#include "content/browser/devtools/protocol/devtools_protocol_handler.h"
+#include "content/browser/devtools/protocol/page_handler.h"
+#include "third_party/WebKit/public/web/WebDeviceEmulationParams.h"
namespace content {
+
+class RenderViewHostImpl;
+
namespace devtools {
+
+namespace page { class PageHandler; }
+
namespace emulation {
-class EmulationHandler {
+class EmulationHandler : public page::PageHandler::ScreencastListener {
public:
using Response = DevToolsProtocolClient::Response;
- EmulationHandler();
- virtual ~EmulationHandler();
+ explicit EmulationHandler(page::PageHandler* page_handler);
+ ~EmulationHandler() override;
+
+ // page::PageHandler::ScreencastListener implementation.
+ void ScreencastEnabledChanged() override;
+
+ void SetRenderViewHost(RenderViewHostImpl* host);
+ void Detached();
Response SetGeolocationOverride(double* latitude,
double* longitude,
@@ -37,9 +51,19 @@ class EmulationHandler {
const double* optional_offset_y);
Response ClearDeviceMetricsOverride();
- void SetClient(scoped_ptr<DevToolsProtocolClient> client);
-
private:
+ void UpdateTouchEventEmulationState();
+ void UpdateDeviceEmulationState();
+
+ bool touch_emulation_enabled_;
+ std::string touch_emulation_configuration_;
+
+ bool device_emulation_enabled_;
+ blink::WebDeviceEmulationParams device_emulation_params_;
+
+ page::PageHandler* page_handler_;
+ RenderViewHostImpl* host_;
+
DISALLOW_COPY_AND_ASSIGN(EmulationHandler);
};
« no previous file with comments | « no previous file | content/browser/devtools/protocol/emulation_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698