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 "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 Response Navigate(const std::string& url, Page::FrameId* frame_id) override; | 53 Response Navigate(const std::string& url, Page::FrameId* frame_id) override; |
54 Response StopLoading() override; | 54 Response StopLoading() override; |
55 | 55 |
56 using NavigationEntries = protocol::Array<Page::NavigationEntry>; | 56 using NavigationEntries = protocol::Array<Page::NavigationEntry>; |
57 Response GetNavigationHistory( | 57 Response GetNavigationHistory( |
58 int* current_index, | 58 int* current_index, |
59 std::unique_ptr<NavigationEntries>* entries) override; | 59 std::unique_ptr<NavigationEntries>* entries) override; |
60 Response NavigateToHistoryEntry(int entry_id) override; | 60 Response NavigateToHistoryEntry(int entry_id) override; |
61 | 61 |
62 void CaptureScreenshot( | 62 void CaptureScreenshot( |
| 63 Maybe<std::string> format, |
| 64 Maybe<int> quality, |
63 std::unique_ptr<CaptureScreenshotCallback> callback) override; | 65 std::unique_ptr<CaptureScreenshotCallback> callback) override; |
64 Response StartScreencast(Maybe<std::string> format, | 66 Response StartScreencast(Maybe<std::string> format, |
65 Maybe<int> quality, | 67 Maybe<int> quality, |
66 Maybe<int> max_width, | 68 Maybe<int> max_width, |
67 Maybe<int> max_height, | 69 Maybe<int> max_height, |
68 Maybe<int> every_nth_frame) override; | 70 Maybe<int> every_nth_frame) override; |
69 Response StopScreencast() override; | 71 Response StopScreencast() override; |
70 Response ScreencastFrameAck(int session_id) override; | 72 Response ScreencastFrameAck(int session_id) override; |
71 | 73 |
72 Response HandleJavaScriptDialog(bool accept, | 74 Response HandleJavaScriptDialog(bool accept, |
(...skipping 16 matching lines...) Expand all Loading... |
89 WebContentsImpl* GetWebContents(); | 91 WebContentsImpl* GetWebContents(); |
90 void NotifyScreencastVisibility(bool visible); | 92 void NotifyScreencastVisibility(bool visible); |
91 void InnerSwapCompositorFrame(); | 93 void InnerSwapCompositorFrame(); |
92 void ScreencastFrameCaptured(cc::CompositorFrameMetadata metadata, | 94 void ScreencastFrameCaptured(cc::CompositorFrameMetadata metadata, |
93 const SkBitmap& bitmap, | 95 const SkBitmap& bitmap, |
94 ReadbackResponse response); | 96 ReadbackResponse response); |
95 void ScreencastFrameEncoded(cc::CompositorFrameMetadata metadata, | 97 void ScreencastFrameEncoded(cc::CompositorFrameMetadata metadata, |
96 const base::Time& timestamp, | 98 const base::Time& timestamp, |
97 const std::string& data); | 99 const std::string& data); |
98 | 100 |
99 void ScreenshotCaptured( | 101 void ScreenshotCaptured(std::unique_ptr<CaptureScreenshotCallback> callback, |
100 std::unique_ptr<CaptureScreenshotCallback> callback, | 102 const std::string& format, |
101 const unsigned char* png_data, | 103 int quality, |
102 size_t png_size); | 104 const SkBitmap& bitmap); |
| 105 void ScreenshotEncoded(std::unique_ptr<CaptureScreenshotCallback> callback, |
| 106 const std::string& data); |
103 | 107 |
104 void OnColorPicked(int r, int g, int b, int a); | 108 void OnColorPicked(int r, int g, int b, int a); |
105 | 109 |
106 // NotificationObserver overrides. | 110 // NotificationObserver overrides. |
107 void Observe(int type, | 111 void Observe(int type, |
108 const NotificationSource& source, | 112 const NotificationSource& source, |
109 const NotificationDetails& details) override; | 113 const NotificationDetails& details) override; |
110 | 114 |
111 bool enabled_; | 115 bool enabled_; |
112 | 116 |
(...skipping 22 matching lines...) Expand all Loading... |
135 NotificationRegistrar registrar_; | 139 NotificationRegistrar registrar_; |
136 base::WeakPtrFactory<PageHandler> weak_factory_; | 140 base::WeakPtrFactory<PageHandler> weak_factory_; |
137 | 141 |
138 DISALLOW_COPY_AND_ASSIGN(PageHandler); | 142 DISALLOW_COPY_AND_ASSIGN(PageHandler); |
139 }; | 143 }; |
140 | 144 |
141 } // namespace protocol | 145 } // namespace protocol |
142 } // namespace content | 146 } // namespace content |
143 | 147 |
144 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_PAGE_HANDLER_H_ | 148 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_PAGE_HANDLER_H_ |
OLD | NEW |