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