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

Unified Diff: cc/trees/proxy_main.h

Issue 1357373002: Add basic framework for splitting thread proxy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor clean-up. Created 5 years, 3 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: cc/trees/proxy_main.h
diff --git a/cc/trees/proxy_main.h b/cc/trees/proxy_main.h
new file mode 100644
index 0000000000000000000000000000000000000000..71230b430551c5a89fee2bf732680506c95f143c
--- /dev/null
+++ b/cc/trees/proxy_main.h
@@ -0,0 +1,40 @@
+// Copyright 2015 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 CC_TREES_PROXY_MAIN_H_
+#define CC_TREES_PROXY_MAIN_H_
+
+#include "base/memory/weak_ptr.h"
+#include "cc/base/cc_export.h"
+
+namespace cc {
+class ThreadedChannel;
+
+// TODO(khushalsagar): The main side of ThreadProxy. It is currently defined as
+// an interface with the implementation provided by ThreadProxy and will be
+// made an independent class.
+// The methods added to this interface should only use the MainThreadOnly or
+// BlockedMainThread variables from ThreadProxy.
+// See crbug/527200.
+class CC_EXPORT ProxyMain {
+ public:
+ // TODO(khushalsagar): Make this ChannelMain*. When ProxyMain and
+ // ProxyImpl are split, ProxyImpl will be passed a reference to ChannelImpl
+ // at creation. Right now we just set it directly from ThreadedChannel
+ // when the impl side is initialized.
+ virtual void SetChannel(scoped_ptr<ThreadedChannel> threaded_channel) = 0;
+
+ // Callback for main side commands received from the Channel.
+ virtual void DidCompleteSwapBuffers() = 0;
+
+ // TODO(khushalsagar): Rename as GetWeakPtr() once ThreadProxy is split.
+ virtual base::WeakPtr<ProxyMain> GetMainWeakPtr() = 0;
+
+ protected:
+ virtual ~ProxyMain() {}
+};
+
+} // namespace cc
+
+#endif // CC_TREES_PROXY_MAIN_H_

Powered by Google App Engine
This is Rietveld 408576698