| 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 21 matching lines...) Expand all Loading... |
| 32 class PageHandler : public NotificationObserver { | 32 class PageHandler : public NotificationObserver { |
| 33 public: | 33 public: |
| 34 typedef DevToolsProtocolClient::Response Response; | 34 typedef DevToolsProtocolClient::Response Response; |
| 35 | 35 |
| 36 PageHandler(); | 36 PageHandler(); |
| 37 ~PageHandler() override; | 37 ~PageHandler() override; |
| 38 | 38 |
| 39 void SetRenderFrameHost(RenderFrameHostImpl* host); | 39 void SetRenderFrameHost(RenderFrameHostImpl* host); |
| 40 void SetClient(std::unique_ptr<Client> client); | 40 void SetClient(std::unique_ptr<Client> client); |
| 41 void Detached(); | 41 void Detached(); |
| 42 void OnSwapCompositorFrame(const cc::CompositorFrameMetadata& frame_metadata); | 42 void OnSwapCompositorFrame(cc::CompositorFrameMetadata frame_metadata); |
| 43 void OnSynchronousSwapCompositorFrame(const cc::CompositorFrameMetadata& | 43 void OnSynchronousSwapCompositorFrame( |
| 44 frame_metadata); | 44 cc::CompositorFrameMetadata frame_metadata); |
| 45 void DidAttachInterstitialPage(); | 45 void DidAttachInterstitialPage(); |
| 46 void DidDetachInterstitialPage(); | 46 void DidDetachInterstitialPage(); |
| 47 bool screencast_enabled() const { return enabled_ && screencast_enabled_; } | 47 bool screencast_enabled() const { return enabled_ && screencast_enabled_; } |
| 48 | 48 |
| 49 Response Enable(); | 49 Response Enable(); |
| 50 Response Disable(); | 50 Response Disable(); |
| 51 | 51 |
| 52 Response Reload(const bool* bypassCache, | 52 Response Reload(const bool* bypassCache, |
| 53 const std::string* script_to_evaluate_on_load, | 53 const std::string* script_to_evaluate_on_load, |
| 54 const std::string* script_preprocessor = NULL); | 54 const std::string* script_preprocessor = NULL); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 76 Response QueryUsageAndQuota(DevToolsCommandId command_id, | 76 Response QueryUsageAndQuota(DevToolsCommandId command_id, |
| 77 const std::string& security_origin); | 77 const std::string& security_origin); |
| 78 | 78 |
| 79 Response SetColorPickerEnabled(bool enabled); | 79 Response SetColorPickerEnabled(bool enabled); |
| 80 Response RequestAppBanner(); | 80 Response RequestAppBanner(); |
| 81 | 81 |
| 82 private: | 82 private: |
| 83 WebContentsImpl* GetWebContents(); | 83 WebContentsImpl* GetWebContents(); |
| 84 void NotifyScreencastVisibility(bool visible); | 84 void NotifyScreencastVisibility(bool visible); |
| 85 void InnerSwapCompositorFrame(); | 85 void InnerSwapCompositorFrame(); |
| 86 void ScreencastFrameCaptured(const cc::CompositorFrameMetadata& metadata, | 86 void ScreencastFrameCaptured(cc::CompositorFrameMetadata metadata, |
| 87 const SkBitmap& bitmap, | 87 const SkBitmap& bitmap, |
| 88 ReadbackResponse response); | 88 ReadbackResponse response); |
| 89 void ScreencastFrameEncoded(const cc::CompositorFrameMetadata& metadata, | 89 void ScreencastFrameEncoded(cc::CompositorFrameMetadata metadata, |
| 90 const base::Time& timestamp, | 90 const base::Time& timestamp, |
| 91 const std::string& data); | 91 const std::string& data); |
| 92 | 92 |
| 93 void ScreenshotCaptured( | 93 void ScreenshotCaptured( |
| 94 DevToolsCommandId command_id, | 94 DevToolsCommandId command_id, |
| 95 const unsigned char* png_data, | 95 const unsigned char* png_data, |
| 96 size_t png_size); | 96 size_t png_size); |
| 97 | 97 |
| 98 void OnColorPicked(int r, int g, int b, int a); | 98 void OnColorPicked(int r, int g, int b, int a); |
| 99 | 99 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 126 base::WeakPtrFactory<PageHandler> weak_factory_; | 126 base::WeakPtrFactory<PageHandler> weak_factory_; |
| 127 | 127 |
| 128 DISALLOW_COPY_AND_ASSIGN(PageHandler); | 128 DISALLOW_COPY_AND_ASSIGN(PageHandler); |
| 129 }; | 129 }; |
| 130 | 130 |
| 131 } // namespace page | 131 } // namespace page |
| 132 } // namespace devtools | 132 } // namespace devtools |
| 133 } // namespace content | 133 } // namespace content |
| 134 | 134 |
| 135 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_PAGE_HANDLER_H_ | 135 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_PAGE_HANDLER_H_ |
| OLD | NEW |