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

Side by Side Diff: content/browser/devtools/protocol/emulation_handler.h

Issue 2226323002: Resize DevTools target frames. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove getFrameSize, rename to setVisibleSize. Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_DEVTOOLS_PROTOCOL_EMULATION_HANDLER_H_ 5 #ifndef CONTENT_BROWSER_DEVTOOLS_PROTOCOL_EMULATION_HANDLER_H_
6 #define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_EMULATION_HANDLER_H_ 6 #define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_EMULATION_HANDLER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "content/browser/devtools/protocol/devtools_protocol_dispatcher.h" 9 #include "content/browser/devtools/protocol/devtools_protocol_dispatcher.h"
10 #include "third_party/WebKit/public/web/WebDeviceEmulationParams.h" 10 #include "third_party/WebKit/public/web/WebDeviceEmulationParams.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 const double* optional_scale, 48 const double* optional_scale,
49 const double* optional_offset_x, 49 const double* optional_offset_x,
50 const double* optional_offset_y, 50 const double* optional_offset_y,
51 const int* screen_widget, 51 const int* screen_widget,
52 const int* screen_height, 52 const int* screen_height,
53 const int* position_x, 53 const int* position_x,
54 const int* position_y, 54 const int* position_y,
55 const std::unique_ptr<base::DictionaryValue>& screen_orientation); 55 const std::unique_ptr<base::DictionaryValue>& screen_orientation);
56 Response ClearDeviceMetricsOverride(); 56 Response ClearDeviceMetricsOverride();
57 57
58 Response SetVisibleSize(int width, int height);
59
58 private: 60 private:
59 WebContentsImpl* GetWebContents(); 61 WebContentsImpl* GetWebContents();
60 void UpdateTouchEventEmulationState(); 62 void UpdateTouchEventEmulationState();
61 void UpdateDeviceEmulationState(); 63 void UpdateDeviceEmulationState();
62 64
63 bool touch_emulation_enabled_; 65 bool touch_emulation_enabled_;
64 std::string touch_emulation_configuration_; 66 std::string touch_emulation_configuration_;
65 67
66 bool device_emulation_enabled_; 68 bool device_emulation_enabled_;
67 blink::WebDeviceEmulationParams device_emulation_params_; 69 blink::WebDeviceEmulationParams device_emulation_params_;
68 70
69 RenderFrameHostImpl* host_; 71 RenderFrameHostImpl* host_;
70 72
71 DISALLOW_COPY_AND_ASSIGN(EmulationHandler); 73 DISALLOW_COPY_AND_ASSIGN(EmulationHandler);
72 }; 74 };
73 75
74 } // namespace emulation 76 } // namespace emulation
75 } // namespace devtools 77 } // namespace devtools
76 } // namespace content 78 } // namespace content
77 79
78 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_EMULATION_HANDLER_H_ 80 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_EMULATION_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698