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

Side by Side Diff: content/renderer/devtools/render_widget_screen_metrics_emulator.h

Issue 2400883003: RenderWidget::windowRect and viewRect should apply device emulation transform. (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « no previous file | content/renderer/render_widget.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_RENDERER_DEVTOOLS_RENDER_WIDGET_SCREEN_METRICS_EMULATOR_H_ 5 #ifndef CONTENT_RENDERER_DEVTOOLS_RENDER_WIDGET_SCREEN_METRICS_EMULATOR_H_
6 #define CONTENT_RENDERER_DEVTOOLS_RENDER_WIDGET_SCREEN_METRICS_EMULATOR_H_ 6 #define CONTENT_RENDERER_DEVTOOLS_RENDER_WIDGET_SCREEN_METRICS_EMULATOR_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "content/common/resize_params.h" 10 #include "content/common/resize_params.h"
11 #include "third_party/WebKit/public/web/WebDeviceEmulationParams.h" 11 #include "third_party/WebKit/public/web/WebDeviceEmulationParams.h"
12 12
13 namespace gfx { 13 namespace gfx {
14 class PointF; 14 class PointF;
15 class Rect; 15 class Rect;
16 } 16 }
17 17
18 namespace content { 18 namespace content {
19 19
20 class RenderWidgetScreenMetricsEmulatorDelegate; 20 class RenderWidgetScreenMetricsEmulatorDelegate;
21 struct ContextMenuParams; 21 struct ContextMenuParams;
22 22
23 // RenderWidgetScreenMetricsEmulator class manages screen emulation inside a 23 // RenderWidgetScreenMetricsEmulator class manages screen emulation inside a
24 // RenderWidget. This includes resizing, placing view on the screen at desired 24 // RenderWidget. This includes resizing, placing view on the screen at desired
25 // position, changing device scale factor, and scaling down the whole 25 // position, changing device scale factor, and scaling down the whole
26 // widget if required to fit into the browser window. 26 // widget if required to fit into the browser window.
27 class RenderWidgetScreenMetricsEmulator { 27 class CONTENT_EXPORT RenderWidgetScreenMetricsEmulator {
28 public: 28 public:
29 RenderWidgetScreenMetricsEmulator( 29 RenderWidgetScreenMetricsEmulator(
30 RenderWidgetScreenMetricsEmulatorDelegate* delegate, 30 RenderWidgetScreenMetricsEmulatorDelegate* delegate,
31 const blink::WebDeviceEmulationParams& params, 31 const blink::WebDeviceEmulationParams& params,
32 const ResizeParams& resize_params, 32 const ResizeParams& resize_params,
33 const gfx::Rect& view_screen_rect, 33 const gfx::Rect& view_screen_rect,
34 const gfx::Rect& window_screen_rect); 34 const gfx::Rect& window_screen_rect);
35 virtual ~RenderWidgetScreenMetricsEmulator(); 35 virtual ~RenderWidgetScreenMetricsEmulator();
36 36
37 // Scale and offset used to convert between host coordinates 37 // Scale and offset used to convert between host coordinates
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 ResizeParams original_resize_params_; 81 ResizeParams original_resize_params_;
82 gfx::Rect original_view_screen_rect_; 82 gfx::Rect original_view_screen_rect_;
83 gfx::Rect original_window_screen_rect_; 83 gfx::Rect original_window_screen_rect_;
84 84
85 DISALLOW_COPY_AND_ASSIGN(RenderWidgetScreenMetricsEmulator); 85 DISALLOW_COPY_AND_ASSIGN(RenderWidgetScreenMetricsEmulator);
86 }; 86 };
87 87
88 } // namespace content 88 } // namespace content
89 89
90 #endif // CONTENT_RENDERER_DEVTOOLS_RENDER_WIDGET_SCREEN_METRICS_EMULATOR_H_ 90 #endif // CONTENT_RENDERER_DEVTOOLS_RENDER_WIDGET_SCREEN_METRICS_EMULATOR_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/render_widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698