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 29 matching lines...) Expand all Loading... |
40 | 40 |
41 Response Enable(); | 41 Response Enable(); |
42 Response Disable(); | 42 Response Disable(); |
43 | 43 |
44 Response Reload(const bool* ignoreCache, | 44 Response Reload(const bool* ignoreCache, |
45 const std::string* script_to_evaluate_on_load, | 45 const std::string* script_to_evaluate_on_load, |
46 const std::string* script_preprocessor); | 46 const std::string* script_preprocessor); |
47 | 47 |
48 Response Navigate(const std::string& url, FrameId* frame_id); | 48 Response Navigate(const std::string& url, FrameId* frame_id); |
49 | 49 |
| 50 using NavigationEntries = std::vector<scoped_refptr<NavigationEntry>>; |
50 Response GetNavigationHistory(int* current_index, | 51 Response GetNavigationHistory(int* current_index, |
51 std::vector<NavigationEntry>* entries); | 52 NavigationEntries* entries); |
52 | 53 |
53 Response NavigateToHistoryEntry(int entry_id); | 54 Response NavigateToHistoryEntry(int entry_id); |
54 | 55 |
55 Response SetGeolocationOverride(double* latitude, | 56 Response SetGeolocationOverride(double* latitude, |
56 double* longitude, | 57 double* longitude, |
57 double* accuracy); | 58 double* accuracy); |
58 | 59 |
59 Response ClearGeolocationOverride(); | 60 Response ClearGeolocationOverride(); |
60 | 61 |
61 Response SetTouchEmulationEnabled(bool enabled); | 62 Response SetTouchEmulationEnabled(bool enabled); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 | 95 |
95 void ScreenshotCaptured( | 96 void ScreenshotCaptured( |
96 scoped_refptr<DevToolsProtocol::Command> command, | 97 scoped_refptr<DevToolsProtocol::Command> command, |
97 const unsigned char* png_data, | 98 const unsigned char* png_data, |
98 size_t png_size); | 99 size_t png_size); |
99 | 100 |
100 void OnColorPicked(int r, int g, int b, int a); | 101 void OnColorPicked(int r, int g, int b, int a); |
101 | 102 |
102 void QueryUsageAndQuotaCompleted( | 103 void QueryUsageAndQuotaCompleted( |
103 scoped_refptr<DevToolsProtocol::Command> command, | 104 scoped_refptr<DevToolsProtocol::Command> command, |
104 scoped_ptr<QueryUsageAndQuotaResponse> response); | 105 scoped_refptr<QueryUsageAndQuotaResponse> response); |
105 | 106 |
106 bool enabled_; | 107 bool enabled_; |
107 bool touch_emulation_enabled_; | 108 bool touch_emulation_enabled_; |
108 | 109 |
109 bool screencast_enabled_; | 110 bool screencast_enabled_; |
110 std::string screencast_format_; | 111 std::string screencast_format_; |
111 int screencast_quality_; | 112 int screencast_quality_; |
112 int screencast_max_width_; | 113 int screencast_max_width_; |
113 int screencast_max_height_; | 114 int screencast_max_height_; |
114 int capture_retry_count_; | 115 int capture_retry_count_; |
115 bool has_last_compositor_frame_metadata_; | 116 bool has_last_compositor_frame_metadata_; |
116 cc::CompositorFrameMetadata last_compositor_frame_metadata_; | 117 cc::CompositorFrameMetadata last_compositor_frame_metadata_; |
117 base::TimeTicks last_frame_time_; | 118 base::TimeTicks last_frame_time_; |
118 | 119 |
119 scoped_ptr<ColorPicker> color_picker_; | 120 scoped_ptr<ColorPicker> color_picker_; |
120 | 121 |
121 RenderViewHostImpl* host_; | 122 RenderViewHostImpl* host_; |
122 scoped_ptr<Client> client_; | 123 scoped_ptr<Client> client_; |
123 base::WeakPtrFactory<PageHandler> weak_factory_; | 124 base::WeakPtrFactory<PageHandler> weak_factory_; |
124 | 125 |
125 DISALLOW_COPY_AND_ASSIGN(PageHandler); | 126 DISALLOW_COPY_AND_ASSIGN(PageHandler); |
126 }; | 127 }; |
127 | 128 |
128 } // namespace page | 129 } // namespace page |
129 } // namespace devtools | 130 } // namespace devtools |
130 } // namespace content | 131 } // namespace content |
131 | 132 |
132 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_PAGE_HANDLER_H_ | 133 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_PAGE_HANDLER_H_ |
OLD | NEW |