Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "content/common/resize_params.h" | 9 #include "content/common/resize_params.h" |
| 10 #include "third_party/WebKit/public/web/WebDeviceEmulationParams.h" | 10 #include "third_party/WebKit/public/web/WebDeviceEmulationParams.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 47 } | 47 } |
| 48 const gfx::Rect& original_screen_rect() const { | 48 const gfx::Rect& original_screen_rect() const { |
| 49 return original_view_screen_rect_; | 49 return original_view_screen_rect_; |
| 50 } | 50 } |
| 51 | 51 |
| 52 void ChangeEmulationParams(const blink::WebDeviceEmulationParams& params); | 52 void ChangeEmulationParams(const blink::WebDeviceEmulationParams& params); |
| 53 | 53 |
| 54 // The following methods alter handlers' behavior for messages related to | 54 // The following methods alter handlers' behavior for messages related to |
| 55 // widget size and position. | 55 // widget size and position. |
| 56 void OnResize(const ResizeParams& params); | 56 void OnResize(const ResizeParams& params); |
| 57 void OnUpdateWindowScreenRectMessage(const gfx::Rect& window_screen_rect); | |
|
nasko
2016/03/03 18:28:57
nit: No need for Message suffix, all IPC handlers
lfg
2016/03/03 22:09:38
Done.
| |
| 57 void OnUpdateScreenRects(const gfx::Rect& view_screen_rect, | 58 void OnUpdateScreenRects(const gfx::Rect& view_screen_rect, |
| 58 const gfx::Rect& window_screen_rect); | 59 const gfx::Rect& window_screen_rect); |
| 59 void OnShowContextMenu(ContextMenuParams* params); | 60 void OnShowContextMenu(ContextMenuParams* params); |
| 60 gfx::Rect AdjustValidationMessageAnchor(const gfx::Rect& anchor); | 61 gfx::Rect AdjustValidationMessageAnchor(const gfx::Rect& anchor); |
| 61 | 62 |
| 62 private: | 63 private: |
| 63 // Apply original_resize_params_ | 64 // Apply original_resize_params_ |
| 64 void Apply(); | 65 void Apply(); |
| 65 | 66 |
| 66 RenderWidgetScreenMetricsEmulatorDelegate* const delegate_; | 67 RenderWidgetScreenMetricsEmulatorDelegate* const delegate_; |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 79 ResizeParams original_resize_params_; | 80 ResizeParams original_resize_params_; |
| 80 gfx::Rect original_view_screen_rect_; | 81 gfx::Rect original_view_screen_rect_; |
| 81 gfx::Rect original_window_screen_rect_; | 82 gfx::Rect original_window_screen_rect_; |
| 82 | 83 |
| 83 DISALLOW_COPY_AND_ASSIGN(RenderWidgetScreenMetricsEmulator); | 84 DISALLOW_COPY_AND_ASSIGN(RenderWidgetScreenMetricsEmulator); |
| 84 }; | 85 }; |
| 85 | 86 |
| 86 } // namespace content | 87 } // namespace content |
| 87 | 88 |
| 88 #endif // CONTENT_RENDERER_DEVTOOLS_RENDER_WIDGET_SCREEN_METRICS_EMULATOR_H_ | 89 #endif // CONTENT_RENDERER_DEVTOOLS_RENDER_WIDGET_SCREEN_METRICS_EMULATOR_H_ |
| OLD | NEW |