Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(231)

Side by Side Diff: content/browser/devtools/protocol/page_handler.h

Issue 1408363004: [DevTools] Filter any messages from previous sessions in DevToolsAgentHostImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 const std::string* script_preprocessor = NULL); 59 const std::string* script_preprocessor = NULL);
60 60
61 Response Navigate(const std::string& url, FrameId* frame_id); 61 Response Navigate(const std::string& url, FrameId* frame_id);
62 62
63 using NavigationEntries = std::vector<scoped_refptr<NavigationEntry>>; 63 using NavigationEntries = std::vector<scoped_refptr<NavigationEntry>>;
64 Response GetNavigationHistory(int* current_index, 64 Response GetNavigationHistory(int* current_index,
65 NavigationEntries* entries); 65 NavigationEntries* entries);
66 66
67 Response NavigateToHistoryEntry(int entry_id); 67 Response NavigateToHistoryEntry(int entry_id);
68 68
69 Response CaptureScreenshot(DevToolsCommandId command_id); 69 Response CaptureScreenshot(int session_id, DevToolsCommandId command_id);
70 70
71 Response CanScreencast(bool* result); 71 Response CanScreencast(bool* result);
72 Response StartScreencast(const std::string* format, 72 Response StartScreencast(const std::string* format,
73 const int* quality, 73 const int* quality,
74 const int* max_width, 74 const int* max_width,
75 const int* max_height); 75 const int* max_height);
76 Response StopScreencast(); 76 Response StopScreencast();
77 Response ScreencastFrameAck(int frame_number); 77 Response ScreencastFrameAck(int frame_number);
78 78
79 Response HandleJavaScriptDialog(bool accept, const std::string* prompt_text); 79 Response HandleJavaScriptDialog(bool accept, const std::string* prompt_text);
80 80
81 Response QueryUsageAndQuota(DevToolsCommandId command_id, 81 Response QueryUsageAndQuota(DevToolsCommandId command_id,
82 const std::string& security_origin); 82 const std::string& security_origin);
83 83
84 Response SetColorPickerEnabled(bool enabled); 84 Response SetColorPickerEnabled(bool enabled);
85 85
86 private: 86 private:
87 WebContentsImpl* GetWebContents(); 87 WebContentsImpl* GetWebContents();
88 void NotifyScreencastVisibility(bool visible); 88 void NotifyScreencastVisibility(bool visible);
89 void InnerSwapCompositorFrame(); 89 void InnerSwapCompositorFrame();
90 void ScreencastFrameCaptured(const cc::CompositorFrameMetadata& metadata, 90 void ScreencastFrameCaptured(const cc::CompositorFrameMetadata& metadata,
91 const SkBitmap& bitmap, 91 const SkBitmap& bitmap,
92 ReadbackResponse response); 92 ReadbackResponse response);
93 void ScreencastFrameEncoded(const cc::CompositorFrameMetadata& metadata, 93 void ScreencastFrameEncoded(const cc::CompositorFrameMetadata& metadata,
94 const base::Time& timestamp, 94 const base::Time& timestamp,
95 const std::string& data); 95 const std::string& data);
96 96
97 void ScreenshotCaptured( 97 void ScreenshotCaptured(int session_id,
98 DevToolsCommandId command_id, 98 DevToolsCommandId command_id,
99 const unsigned char* png_data, 99 const unsigned char* png_data,
100 size_t png_size); 100 size_t png_size);
101 101
102 void OnColorPicked(int r, int g, int b, int a); 102 void OnColorPicked(int r, int g, int b, int a);
103 103
104 // NotificationObserver overrides. 104 // NotificationObserver overrides.
105 void Observe(int type, 105 void Observe(int type,
106 const NotificationSource& source, 106 const NotificationSource& source,
107 const NotificationDetails& details) override; 107 const NotificationDetails& details) override;
108 108
109 bool enabled_; 109 bool enabled_;
110 110
(...skipping 19 matching lines...) Expand all
130 base::WeakPtrFactory<PageHandler> weak_factory_; 130 base::WeakPtrFactory<PageHandler> weak_factory_;
131 131
132 DISALLOW_COPY_AND_ASSIGN(PageHandler); 132 DISALLOW_COPY_AND_ASSIGN(PageHandler);
133 }; 133 };
134 134
135 } // namespace page 135 } // namespace page
136 } // namespace devtools 136 } // namespace devtools
137 } // namespace content 137 } // namespace content
138 138
139 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_PAGE_HANDLER_H_ 139 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_PAGE_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698