| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 const std::string& security_origin, | 79 const std::string& security_origin, |
| 79 scoped_refptr<DevToolsProtocol::Command> command); | 80 scoped_refptr<DevToolsProtocol::Command> command); |
| 80 | 81 |
| 81 Response SetColorPickerEnabled(bool enabled); | 82 Response SetColorPickerEnabled(bool enabled); |
| 82 | 83 |
| 83 private: | 84 private: |
| 84 void UpdateTouchEventEmulationState(); | 85 void UpdateTouchEventEmulationState(); |
| 85 | 86 |
| 86 void NotifyScreencastVisibility(bool visible); | 87 void NotifyScreencastVisibility(bool visible); |
| 87 void InnerSwapCompositorFrame(); | 88 void InnerSwapCompositorFrame(); |
| 88 void ScreencastFrameCaptured( | 89 void ScreencastFrameCaptured(const std::string& format, |
| 89 const std::string& format, | 90 int quality, |
| 90 int quality, | 91 const cc::CompositorFrameMetadata& metadata, |
| 91 const cc::CompositorFrameMetadata& metadata, | 92 const SkBitmap& bitmap, |
| 92 bool success, | 93 const ReadbackResponse& response); |
| 93 const SkBitmap& bitmap); | |
| 94 | 94 |
| 95 void ScreenshotCaptured( | 95 void ScreenshotCaptured( |
| 96 scoped_refptr<DevToolsProtocol::Command> command, | 96 scoped_refptr<DevToolsProtocol::Command> command, |
| 97 const unsigned char* png_data, | 97 const unsigned char* png_data, |
| 98 size_t png_size); | 98 size_t png_size); |
| 99 | 99 |
| 100 void OnColorPicked(int r, int g, int b, int a); | 100 void OnColorPicked(int r, int g, int b, int a); |
| 101 | 101 |
| 102 void QueryUsageAndQuotaCompleted( | 102 void QueryUsageAndQuotaCompleted( |
| 103 scoped_refptr<DevToolsProtocol::Command> command, | 103 scoped_refptr<DevToolsProtocol::Command> command, |
| (...skipping 19 matching lines...) Expand all Loading... |
| 123 base::WeakPtrFactory<PageHandler> weak_factory_; | 123 base::WeakPtrFactory<PageHandler> weak_factory_; |
| 124 | 124 |
| 125 DISALLOW_COPY_AND_ASSIGN(PageHandler); | 125 DISALLOW_COPY_AND_ASSIGN(PageHandler); |
| 126 }; | 126 }; |
| 127 | 127 |
| 128 } // namespace page | 128 } // namespace page |
| 129 } // namespace devtools | 129 } // namespace devtools |
| 130 } // namespace content | 130 } // namespace content |
| 131 | 131 |
| 132 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_PAGE_HANDLER_H_ | 132 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_PAGE_HANDLER_H_ |
| OLD | NEW |