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

Unified Diff: cc/trees/proxy_impl.h

Issue 2513863002: cc: Delete channel abstraction between proxies. (Closed)
Patch Set: Rebase Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/layer_tree_host_in_process.cc ('k') | cc/trees/proxy_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/proxy_impl.h
diff --git a/cc/trees/proxy_impl.h b/cc/trees/proxy_impl.h
index d6c20c10db8978571ae2be5b828b944c4783128b..fdabbbd3307258f40d6003265c80eb785344b84e 100644
--- a/cc/trees/proxy_impl.h
+++ b/cc/trees/proxy_impl.h
@@ -8,28 +8,28 @@
#include <memory>
#include "base/macros.h"
+#include "base/memory/weak_ptr.h"
#include "cc/base/completion_event.h"
#include "cc/base/delayed_unique_notifier.h"
#include "cc/input/browser_controls_state.h"
#include "cc/scheduler/scheduler.h"
-#include "cc/trees/channel_impl.h"
#include "cc/trees/layer_tree_host_impl.h"
namespace cc {
class LayerTreeHostInProcess;
+class ProxyMain;
// This class aggregates all the interactions that the main side of the
-// compositor needs to have with the impl side. It is created and owned by the
-// ChannelImpl implementation. The class lives entirely on the impl thread.
+// compositor needs to have with the impl side.
+// The class is created and lives on the impl thread.
class CC_EXPORT ProxyImpl : public NON_EXPORTED_BASE(LayerTreeHostImplClient),
public NON_EXPORTED_BASE(SchedulerClient) {
public:
- ProxyImpl(ChannelImpl* channel_impl,
+ ProxyImpl(base::WeakPtr<ProxyMain> proxy_main_weak_ptr,
LayerTreeHostInProcess* layer_tree_host,
TaskRunnerProvider* task_runner_provider);
~ProxyImpl() override;
- // Virtual for testing.
void UpdateBrowserControlsStateOnImpl(BrowserControlsState constraints,
BrowserControlsState current,
bool animate);
@@ -108,6 +108,7 @@ class CC_EXPORT ProxyImpl : public NON_EXPORTED_BASE(LayerTreeHostImplClient),
bool IsImplThread() const;
bool IsMainThreadBlocked() const;
+ base::SingleThreadTaskRunner* MainThreadTaskRunner();
const int layer_tree_host_id_;
@@ -137,12 +138,13 @@ class CC_EXPORT ProxyImpl : public NON_EXPORTED_BASE(LayerTreeHostImplClient),
std::unique_ptr<LayerTreeHostImpl> layer_tree_host_impl_;
- ChannelImpl* channel_impl_;
-
// Use accessors instead of this variable directly.
BlockedMainCommitOnly main_thread_blocked_commit_vars_unsafe_;
BlockedMainCommitOnly& blocked_main_commit();
+ // Used to post tasks to ProxyMain on the main thread.
+ base::WeakPtr<ProxyMain> proxy_main_weak_ptr_;
+
DISALLOW_COPY_AND_ASSIGN(ProxyImpl);
};
« no previous file with comments | « cc/trees/layer_tree_host_in_process.cc ('k') | cc/trees/proxy_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698