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

Side by Side 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, 2 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CC_TREES_PROXY_MAIN_H_
6 #define CC_TREES_PROXY_MAIN_H_
7
8 #include "base/memory/weak_ptr.h"
9 #include "cc/base/cc_export.h"
10
11 namespace cc {
12 class ThreadedChannel;
13
14 // TODO(khushalsagar): The main side of ThreadProxy. It is currently defined as
15 // an interface with the implementation provided by ThreadProxy and will be
16 // made an independent class.
17 // The methods added to this interface should only use the MainThreadOnly or
18 // BlockedMainThread variables from ThreadProxy.
19 // See crbug/527200.
20 class CC_EXPORT ProxyMain {
21 public:
22 // TODO(khushalsagar): Make this ChannelMain*. When ProxyMain and
23 // ProxyImpl are split, ProxyImpl will be passed a reference to ChannelImpl
24 // at creation. Right now we just set it directly from ThreadedChannel
25 // when the impl side is initialized.
26 virtual void SetChannel(scoped_ptr<ThreadedChannel> threaded_channel) = 0;
27
28 // Callback for main side commands received from the Channel.
29 virtual void DidCompleteSwapBuffers() = 0;
30
31 // TODO(khushalsagar): Rename as GetWeakPtr() once ThreadProxy is split.
32 virtual base::WeakPtr<ProxyMain> GetMainWeakPtr() = 0;
33
34 protected:
35 virtual ~ProxyMain() {}
36 };
37
38 } // namespace cc
39
40 #endif // CC_TREES_PROXY_MAIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698