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

Unified Diff: content/browser/devtools/protocol/frame_recorder.h

Issue 1035173002: DevTools: Remove old "record frames" instrumentation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/devtools/protocol/frame_recorder.h
diff --git a/content/browser/devtools/protocol/frame_recorder.h b/content/browser/devtools/protocol/frame_recorder.h
deleted file mode 100644
index 56926efc09530ae5917adac589665140e19c11f3..0000000000000000000000000000000000000000
--- a/content/browser/devtools/protocol/frame_recorder.h
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CONTENT_BROWSER_DEVTOOLS_PROTOCOL_FRAME_RECORDER_H_
-#define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_FRAME_RECORDER_H_
-
-#include <string>
-#include <utility>
-#include <vector>
-
-#include "base/callback.h"
-#include "base/cancelable_callback.h"
-#include "base/memory/ref_counted.h"
-#include "base/memory/weak_ptr.h"
-#include "base/time/time.h"
-#include "content/browser/devtools/protocol/devtools_protocol_handler.h"
-#include "content/public/browser/readback_types.h"
-
-class SkBitmap;
-
-namespace content {
-
-class RenderViewHostImpl;
-
-namespace devtools {
-namespace page {
-
-using EncodedFrame = std::pair<std::string, double>;
-
-class FrameRecorder {
- public:
- using Response = DevToolsProtocolClient::Response;
- using StopRecordingFramesCallback =
- base::Callback<void(scoped_refptr<StopRecordingFramesResponse>)>;
-
- explicit FrameRecorder();
- virtual ~FrameRecorder();
-
- Response StartRecordingFrames(int max_frame_count);
- Response StopRecordingFrames(StopRecordingFramesCallback callback);
- Response CancelRecordingFrames();
-
- void SetRenderViewHost(RenderViewHostImpl* host);
- void OnSwapCompositorFrame();
-
- private:
- enum State {
- Ready,
- Recording,
- Encoding
- };
-
- void FrameCaptured(const SkBitmap& bitmap, ReadbackResponse response);
- void FrameEncoded(const scoped_ptr<EncodedFrame>& encoded_frame);
- void MaybeSendResponse();
-
- RenderViewHostImpl* host_;
- State state_;
- StopRecordingFramesCallback callback_;
- size_t inflight_requests_count_;
- size_t max_frame_count_;
- size_t captured_frames_count_;
- base::Time last_captured_frame_timestamp_;
- std::vector<scoped_refptr<devtools::page::RecordedFrame>> frames_;
-
- base::CancelableCallback<void(const scoped_ptr<EncodedFrame>&)>
- frame_encoded_callback_;
- base::WeakPtrFactory<FrameRecorder> weak_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(FrameRecorder);
-};
-
-} // namespace page
-} // namespace devtools
-} // namespace content
-
-#endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_FRAME_RECORDER_H_
« no previous file with comments | « no previous file | content/browser/devtools/protocol/frame_recorder.cc » ('j') | content/browser/devtools/protocol/page_handler.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698