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" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
13 #include "base/time/time.h" | 13 #include "base/time/time.h" |
14 #include "cc/output/compositor_frame_metadata.h" | 14 #include "cc/output/compositor_frame_metadata.h" |
| 15 #include "content/browser/devtools/protocol/devtools_domain_handler.h" |
15 #include "content/browser/devtools/protocol/page.h" | 16 #include "content/browser/devtools/protocol/page.h" |
16 #include "content/public/browser/notification_observer.h" | 17 #include "content/public/browser/notification_observer.h" |
17 #include "content/public/browser/notification_registrar.h" | 18 #include "content/public/browser/notification_registrar.h" |
18 #include "content/public/browser/readback_types.h" | 19 #include "content/public/browser/readback_types.h" |
19 | 20 |
20 class SkBitmap; | 21 class SkBitmap; |
21 | 22 |
22 namespace content { | 23 namespace content { |
23 | 24 |
24 class NavigationHandle; | 25 class NavigationHandle; |
25 class PageNavigationThrottle; | 26 class PageNavigationThrottle; |
26 class RenderFrameHostImpl; | 27 class RenderFrameHostImpl; |
27 class WebContentsImpl; | 28 class WebContentsImpl; |
28 | 29 |
29 namespace protocol { | 30 namespace protocol { |
30 | 31 |
31 class ColorPicker; | 32 class ColorPicker; |
32 | 33 |
33 class PageHandler : public Page::Backend, | 34 class PageHandler : public DevToolsDomainHandler, |
| 35 public Page::Backend, |
34 public NotificationObserver { | 36 public NotificationObserver { |
35 public: | 37 public: |
36 PageHandler(); | 38 PageHandler(); |
37 ~PageHandler() override; | 39 ~PageHandler() override; |
38 | 40 |
39 void Wire(UberDispatcher*); | 41 void Wire(UberDispatcher* dispatcher) override; |
40 void SetRenderFrameHost(RenderFrameHostImpl* host); | 42 void SetRenderFrameHost(RenderFrameHostImpl* host) override; |
41 void OnSwapCompositorFrame(cc::CompositorFrameMetadata frame_metadata); | 43 void OnSwapCompositorFrame(cc::CompositorFrameMetadata frame_metadata); |
42 void OnSynchronousSwapCompositorFrame( | 44 void OnSynchronousSwapCompositorFrame( |
43 cc::CompositorFrameMetadata frame_metadata); | 45 cc::CompositorFrameMetadata frame_metadata); |
44 void DidAttachInterstitialPage(); | 46 void DidAttachInterstitialPage(); |
45 void DidDetachInterstitialPage(); | 47 void DidDetachInterstitialPage(); |
46 bool screencast_enabled() const { return enabled_ && screencast_enabled_; } | 48 bool screencast_enabled() const { return enabled_ && screencast_enabled_; } |
47 | 49 |
48 Response Enable() override; | 50 Response Enable() override; |
49 Response Disable() override; | 51 Response Disable() override; |
50 | 52 |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 NotificationRegistrar registrar_; | 137 NotificationRegistrar registrar_; |
136 base::WeakPtrFactory<PageHandler> weak_factory_; | 138 base::WeakPtrFactory<PageHandler> weak_factory_; |
137 | 139 |
138 DISALLOW_COPY_AND_ASSIGN(PageHandler); | 140 DISALLOW_COPY_AND_ASSIGN(PageHandler); |
139 }; | 141 }; |
140 | 142 |
141 } // namespace protocol | 143 } // namespace protocol |
142 } // namespace content | 144 } // namespace content |
143 | 145 |
144 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_PAGE_HANDLER_H_ | 146 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_PAGE_HANDLER_H_ |
OLD | NEW |