OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 18 matching lines...) Expand all Loading... |
29 */ | 29 */ |
30 | 30 |
31 #ifndef WebDevToolsAgentClient_h | 31 #ifndef WebDevToolsAgentClient_h |
32 #define WebDevToolsAgentClient_h | 32 #define WebDevToolsAgentClient_h |
33 | 33 |
34 #include "../platform/WebCString.h" | 34 #include "../platform/WebCString.h" |
35 #include "../platform/WebCommon.h" | 35 #include "../platform/WebCommon.h" |
36 | 36 |
37 namespace blink { | 37 namespace blink { |
38 class WebString; | 38 class WebString; |
| 39 struct WebDeviceEmulationParams; |
39 struct WebDevToolsMessageData; | 40 struct WebDevToolsMessageData; |
40 struct WebRect; | 41 struct WebRect; |
41 struct WebSize; | 42 struct WebSize; |
42 | 43 |
43 class WebDevToolsAgentClient { | 44 class WebDevToolsAgentClient { |
44 public: | 45 public: |
45 virtual void sendMessageToInspectorFrontend(const WebString&) { } | 46 virtual void sendMessageToInspectorFrontend(const WebString&) { } |
46 virtual void sendDebuggerOutput(const WebString&) { } | 47 virtual void sendDebuggerOutput(const WebString&) { } |
47 | 48 |
48 // Returns the identifier of the entity hosting this agent. | 49 // Returns the identifier of the entity hosting this agent. |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 // Called to emulate device dimensions, scale factor and input. Window shoul
d | 93 // Called to emulate device dimensions, scale factor and input. Window shoul
d |
93 // occupy the whole device screen, while the view should be located at |view
Rect|. | 94 // occupy the whole device screen, while the view should be located at |view
Rect|. |
94 // x-coordinate of |screenRect| defines the left and right gutters' width, | 95 // x-coordinate of |screenRect| defines the left and right gutters' width, |
95 // y-coordinate defines the top and bottom gutters' height. | 96 // y-coordinate defines the top and bottom gutters' height. |
96 // With |fitToView| set, contents should be scaled down to fit into embedder
window. | 97 // With |fitToView| set, contents should be scaled down to fit into embedder
window. |
97 // All sizes are measured in device independent pixels. | 98 // All sizes are measured in device independent pixels. |
98 virtual void enableDeviceEmulation( | 99 virtual void enableDeviceEmulation( |
99 const WebRect& screenRect, const WebRect& viewRect, | 100 const WebRect& screenRect, const WebRect& viewRect, |
100 float deviceScaleFactor, bool fitToView) { } | 101 float deviceScaleFactor, bool fitToView) { } |
101 | 102 |
| 103 // Enables device emulation as specified in params. |
| 104 virtual void enableDeviceEmulation(const WebDeviceEmulationParams& params) {
} |
| 105 |
102 // Cancel emulation started via |enableDeviceEmulation| call. | 106 // Cancel emulation started via |enableDeviceEmulation| call. |
103 virtual void disableDeviceEmulation() { } | 107 virtual void disableDeviceEmulation() { } |
104 | 108 |
105 protected: | 109 protected: |
106 ~WebDevToolsAgentClient() { } | 110 ~WebDevToolsAgentClient() { } |
107 }; | 111 }; |
108 | 112 |
109 } // namespace blink | 113 } // namespace blink |
110 | 114 |
111 #endif | 115 #endif |
OLD | NEW |