| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <map> |
| 11 #include <memory> |
| 12 #include <string> |
| 13 |
| 10 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
| 11 #include "base/macros.h" | 15 #include "base/macros.h" |
| 12 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
| 13 #include "base/time/time.h" | 17 #include "base/time/time.h" |
| 14 #include "cc/output/compositor_frame_metadata.h" | 18 #include "cc/output/compositor_frame_metadata.h" |
| 15 #include "content/browser/devtools/protocol/devtools_domain_handler.h" | 19 #include "content/browser/devtools/protocol/devtools_domain_handler.h" |
| 16 #include "content/browser/devtools/protocol/page.h" | 20 #include "content/browser/devtools/protocol/page.h" |
| 17 #include "content/public/browser/notification_observer.h" | 21 #include "content/public/browser/notification_observer.h" |
| 18 #include "content/public/browser/notification_registrar.h" | 22 #include "content/public/browser/notification_registrar.h" |
| 19 #include "content/public/browser/readback_types.h" | 23 #include "content/public/browser/readback_types.h" |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 ReadbackResponse response); | 114 ReadbackResponse response); |
| 111 void ScreencastFrameEncoded(cc::CompositorFrameMetadata metadata, | 115 void ScreencastFrameEncoded(cc::CompositorFrameMetadata metadata, |
| 112 const base::Time& timestamp, | 116 const base::Time& timestamp, |
| 113 const std::string& data); | 117 const std::string& data); |
| 114 | 118 |
| 115 void ScreenshotCaptured(std::unique_ptr<CaptureScreenshotCallback> callback, | 119 void ScreenshotCaptured(std::unique_ptr<CaptureScreenshotCallback> callback, |
| 116 const std::string& format, | 120 const std::string& format, |
| 117 int quality, | 121 int quality, |
| 118 const gfx::Image& image); | 122 const gfx::Image& image); |
| 119 | 123 |
| 124 void BitmapScreenshotCaptured( |
| 125 std::unique_ptr<CaptureScreenshotCallback> callback, |
| 126 const std::string& format, |
| 127 int quality, |
| 128 const SkBitmap& bitmap); |
| 129 |
| 130 void BitmapScreenshotEncoded( |
| 131 std::unique_ptr<CaptureScreenshotCallback> callback, |
| 132 const std::string& data); |
| 133 |
| 120 void OnColorPicked(int r, int g, int b, int a); | 134 void OnColorPicked(int r, int g, int b, int a); |
| 121 | 135 |
| 122 // NotificationObserver overrides. | 136 // NotificationObserver overrides. |
| 123 void Observe(int type, | 137 void Observe(int type, |
| 124 const NotificationSource& source, | 138 const NotificationSource& source, |
| 125 const NotificationDetails& details) override; | 139 const NotificationDetails& details) override; |
| 126 | 140 |
| 127 bool enabled_; | 141 bool enabled_; |
| 128 | 142 |
| 129 bool screencast_enabled_; | 143 bool screencast_enabled_; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 151 NotificationRegistrar registrar_; | 165 NotificationRegistrar registrar_; |
| 152 base::WeakPtrFactory<PageHandler> weak_factory_; | 166 base::WeakPtrFactory<PageHandler> weak_factory_; |
| 153 | 167 |
| 154 DISALLOW_COPY_AND_ASSIGN(PageHandler); | 168 DISALLOW_COPY_AND_ASSIGN(PageHandler); |
| 155 }; | 169 }; |
| 156 | 170 |
| 157 } // namespace protocol | 171 } // namespace protocol |
| 158 } // namespace content | 172 } // namespace content |
| 159 | 173 |
| 160 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_PAGE_HANDLER_H_ | 174 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_PAGE_HANDLER_H_ |
| OLD | NEW |