OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_PAGE_HANDLER_H_ | 5 #ifndef CONTENT_BROWSER_DEVTOOLS_PROTOCOL_PAGE_HANDLER_H_ |
6 #define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_PAGE_HANDLER_H_ | 6 #define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_PAGE_HANDLER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
11 #include "base/time/time.h" | 11 #include "base/time/time.h" |
12 #include "cc/output/compositor_frame_metadata.h" | 12 #include "cc/output/compositor_frame_metadata.h" |
13 #include "content/browser/devtools/protocol/devtools_protocol_handler_impl.h" | 13 #include "content/browser/devtools/protocol/devtools_protocol_handler_impl.h" |
| 14 #include "content/public/browser/readback_types.h" |
14 | 15 |
15 class SkBitmap; | 16 class SkBitmap; |
16 | 17 |
17 namespace content { | 18 namespace content { |
18 | 19 |
19 class RenderViewHostImpl; | 20 class RenderViewHostImpl; |
20 | 21 |
21 namespace devtools { | 22 namespace devtools { |
22 namespace page { | 23 namespace page { |
23 | 24 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 const std::string& security_origin, | 82 const std::string& security_origin, |
82 scoped_refptr<DevToolsProtocol::Command> command); | 83 scoped_refptr<DevToolsProtocol::Command> command); |
83 | 84 |
84 Response SetColorPickerEnabled(bool enabled); | 85 Response SetColorPickerEnabled(bool enabled); |
85 | 86 |
86 private: | 87 private: |
87 void UpdateTouchEventEmulationState(); | 88 void UpdateTouchEventEmulationState(); |
88 | 89 |
89 void NotifyScreencastVisibility(bool visible); | 90 void NotifyScreencastVisibility(bool visible); |
90 void InnerSwapCompositorFrame(); | 91 void InnerSwapCompositorFrame(); |
91 void ScreencastFrameCaptured( | 92 void ScreencastFrameCaptured(const std::string& format, |
92 const std::string& format, | 93 int quality, |
93 int quality, | 94 const cc::CompositorFrameMetadata& metadata, |
94 const cc::CompositorFrameMetadata& metadata, | 95 const SkBitmap& bitmap, |
95 bool success, | 96 ReadbackResponse response); |
96 const SkBitmap& bitmap); | |
97 | 97 |
98 void ScreenshotCaptured( | 98 void ScreenshotCaptured( |
99 scoped_refptr<DevToolsProtocol::Command> command, | 99 scoped_refptr<DevToolsProtocol::Command> command, |
100 const unsigned char* png_data, | 100 const unsigned char* png_data, |
101 size_t png_size); | 101 size_t png_size); |
102 | 102 |
103 void OnColorPicked(int r, int g, int b, int a); | 103 void OnColorPicked(int r, int g, int b, int a); |
104 | 104 |
105 void QueryUsageAndQuotaCompleted( | 105 void QueryUsageAndQuotaCompleted( |
106 scoped_refptr<DevToolsProtocol::Command> command, | 106 scoped_refptr<DevToolsProtocol::Command> command, |
(...skipping 20 matching lines...) Expand all Loading... |
127 base::WeakPtrFactory<PageHandler> weak_factory_; | 127 base::WeakPtrFactory<PageHandler> weak_factory_; |
128 | 128 |
129 DISALLOW_COPY_AND_ASSIGN(PageHandler); | 129 DISALLOW_COPY_AND_ASSIGN(PageHandler); |
130 }; | 130 }; |
131 | 131 |
132 } // namespace page | 132 } // namespace page |
133 } // namespace devtools | 133 } // namespace devtools |
134 } // namespace content | 134 } // namespace content |
135 | 135 |
136 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_PAGE_HANDLER_H_ | 136 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_PAGE_HANDLER_H_ |
OLD | NEW |