mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update to Chromium revision 241258.
- Update tracing implementation to use the new file-based approach (issue #1157). git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1549 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
||||
// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights
|
||||
// reserved. Use of this source code is governed by a BSD-style license that can
|
||||
// be found in the LICENSE file.
|
||||
|
||||
@@ -8,38 +8,27 @@
|
||||
|
||||
#include "include/cef_trace.h"
|
||||
|
||||
#include "base/debug/trace_event.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "base/memory/ref_counted_memory.h"
|
||||
#include "base/memory/scoped_ptr.h"
|
||||
#include "content/public/browser/trace_subscriber.h"
|
||||
#include "base/memory/weak_ptr.h"
|
||||
|
||||
// May only be accessed on the browser process UI thread.
|
||||
class CefTraceSubscriber : public content::TraceSubscriber {
|
||||
class CefTraceSubscriber {
|
||||
public:
|
||||
CefTraceSubscriber();
|
||||
virtual ~CefTraceSubscriber();
|
||||
|
||||
bool BeginTracing(CefRefPtr<CefTraceClient> client,
|
||||
const std::string& categories);
|
||||
bool GetTraceBufferPercentFullAsync();
|
||||
bool EndTracingAsync();
|
||||
|
||||
typedef base::Callback<void(const std::set<std::string>&)>
|
||||
KnownCategoriesCallback;
|
||||
void GetKnownCategoriesAsync(const KnownCategoriesCallback& callback);
|
||||
bool BeginTracing(const std::string& categories);
|
||||
bool EndTracingAsync(const base::FilePath& tracing_file,
|
||||
CefRefPtr<CefEndTracingCallback> callback);
|
||||
|
||||
private:
|
||||
// content::TraceSubscriber methods:
|
||||
virtual void OnTraceDataCollected(
|
||||
const scoped_refptr<base::RefCountedString>& trace_fragment) OVERRIDE;
|
||||
virtual void OnTraceBufferPercentFullReply(float percent_full) OVERRIDE;
|
||||
virtual void OnEndTracingComplete() OVERRIDE;
|
||||
virtual void OnKnownCategoriesCollected(
|
||||
const std::set<std::string>& known_categories) OVERRIDE;
|
||||
void OnTracingFileResult(CefRefPtr<CefEndTracingCallback> callback,
|
||||
const base::FilePath& tracing_file);
|
||||
|
||||
bool collecting_trace_data_;
|
||||
KnownCategoriesCallback known_categories_callback_;
|
||||
CefRefPtr<CefTraceClient> client_;
|
||||
base::WeakPtrFactory<CefTraceSubscriber> weak_factory_;
|
||||
};
|
||||
|
||||
#endif // CEF_LIBCEF_BROWSER_TRACE_SUBSCRIBER_H_
|
||||
|
Reference in New Issue
Block a user