| 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" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 namespace devtools { | 23 namespace devtools { |
| 24 namespace page { | 24 namespace page { |
| 25 | 25 |
| 26 class ColorPicker; | 26 class ColorPicker; |
| 27 class FrameRecorder; | 27 class FrameRecorder; |
| 28 | 28 |
| 29 class PageHandler { | 29 class PageHandler { |
| 30 public: | 30 public: |
| 31 typedef DevToolsProtocolClient::Response Response; | 31 typedef DevToolsProtocolClient::Response Response; |
| 32 | 32 |
| 33 class ScreencastListener { |
| 34 public: |
| 35 virtual ~ScreencastListener() { } |
| 36 virtual void ScreencastEnabledChanged() = 0; |
| 37 }; |
| 38 |
| 33 PageHandler(); | 39 PageHandler(); |
| 34 virtual ~PageHandler(); | 40 virtual ~PageHandler(); |
| 35 | 41 |
| 36 void SetRenderViewHost(RenderViewHostImpl* host); | 42 void SetRenderViewHost(RenderViewHostImpl* host); |
| 37 void SetClient(scoped_ptr<Client> client); | 43 void SetClient(scoped_ptr<Client> client); |
| 38 void Detached(); | 44 void Detached(); |
| 39 void OnSwapCompositorFrame(const cc::CompositorFrameMetadata& frame_metadata); | 45 void OnSwapCompositorFrame(const cc::CompositorFrameMetadata& frame_metadata); |
| 40 void OnVisibilityChanged(bool visible); | 46 void OnVisibilityChanged(bool visible); |
| 41 void DidAttachInterstitialPage(); | 47 void DidAttachInterstitialPage(); |
| 42 void DidDetachInterstitialPage(); | 48 void DidDetachInterstitialPage(); |
| 49 void SetScreencastListener(ScreencastListener* listener); |
| 50 bool screencast_enabled() const { return enabled_ && screencast_enabled_; } |
| 43 | 51 |
| 44 Response Enable(); | 52 Response Enable(); |
| 45 Response Disable(); | 53 Response Disable(); |
| 46 | 54 |
| 47 Response Reload(const bool* ignoreCache, | 55 Response Reload(const bool* ignoreCache, |
| 48 const std::string* script_to_evaluate_on_load, | 56 const std::string* script_to_evaluate_on_load, |
| 49 const std::string* script_preprocessor = NULL); | 57 const std::string* script_preprocessor = NULL); |
| 50 | 58 |
| 51 Response Navigate(const std::string& url, FrameId* frame_id); | 59 Response Navigate(const std::string& url, FrameId* frame_id); |
| 52 | 60 |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 cc::CompositorFrameMetadata last_compositor_frame_metadata_; | 148 cc::CompositorFrameMetadata last_compositor_frame_metadata_; |
| 141 int screencast_frame_sent_; | 149 int screencast_frame_sent_; |
| 142 int screencast_frame_acked_; | 150 int screencast_frame_acked_; |
| 143 bool processing_screencast_frame_; | 151 bool processing_screencast_frame_; |
| 144 | 152 |
| 145 scoped_ptr<ColorPicker> color_picker_; | 153 scoped_ptr<ColorPicker> color_picker_; |
| 146 scoped_ptr<FrameRecorder> frame_recorder_; | 154 scoped_ptr<FrameRecorder> frame_recorder_; |
| 147 | 155 |
| 148 RenderViewHostImpl* host_; | 156 RenderViewHostImpl* host_; |
| 149 scoped_ptr<Client> client_; | 157 scoped_ptr<Client> client_; |
| 158 ScreencastListener* screencast_listener_; |
| 150 base::WeakPtrFactory<PageHandler> weak_factory_; | 159 base::WeakPtrFactory<PageHandler> weak_factory_; |
| 151 | 160 |
| 152 DISALLOW_COPY_AND_ASSIGN(PageHandler); | 161 DISALLOW_COPY_AND_ASSIGN(PageHandler); |
| 153 }; | 162 }; |
| 154 | 163 |
| 155 } // namespace page | 164 } // namespace page |
| 156 } // namespace devtools | 165 } // namespace devtools |
| 157 } // namespace content | 166 } // namespace content |
| 158 | 167 |
| 159 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_PAGE_HANDLER_H_ | 168 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_PAGE_HANDLER_H_ |
| OLD | NEW |