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

Side by Side Diff: chrome/renderer/render_thread.h

Issue 28090: Keeping track of whether WebKit is in the callstack using RenderThread doesn'... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_RENDERER_RENDER_THREAD_H_ 5 #ifndef CHROME_RENDERER_RENDER_THREAD_H_
6 #define CHROME_RENDERER_RENDER_THREAD_H_ 6 #define CHROME_RENDERER_RENDER_THREAD_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/gfx/native_widget_types.h" 10 #include "base/gfx/native_widget_types.h"
(...skipping 13 matching lines...) Expand all
24 24
25 // The RenderThreadBase is the minimal interface that a RenderView/Widget 25 // The RenderThreadBase is the minimal interface that a RenderView/Widget
26 // expects from a render thread. The interface basically abstracts a way to send 26 // expects from a render thread. The interface basically abstracts a way to send
27 // and receive messages. 27 // and receive messages.
28 class RenderThreadBase { 28 class RenderThreadBase {
29 public: 29 public:
30 virtual ~RenderThreadBase() {} 30 virtual ~RenderThreadBase() {}
31 31
32 virtual bool Send(IPC::Message* msg) = 0; 32 virtual bool Send(IPC::Message* msg) = 0;
33 33
34 // True if currently sending a message.
35 virtual bool InSend() const = 0;
36
37 // Called to add or remove a listener for a particular message routing ID. 34 // Called to add or remove a listener for a particular message routing ID.
38 // These methods normally get delegated to a MessageRouter. 35 // These methods normally get delegated to a MessageRouter.
39 virtual void AddRoute(int32 routing_id, IPC::Channel::Listener* listener) = 0; 36 virtual void AddRoute(int32 routing_id, IPC::Channel::Listener* listener) = 0;
40 virtual void RemoveRoute(int32 routing_id) = 0; 37 virtual void RemoveRoute(int32 routing_id) = 0;
41 38
42 virtual void AddFilter(IPC::ChannelProxy::MessageFilter* filter) = 0; 39 virtual void AddFilter(IPC::ChannelProxy::MessageFilter* filter) = 0;
43 virtual void RemoveFilter(IPC::ChannelProxy::MessageFilter* filter) = 0; 40 virtual void RemoveFilter(IPC::ChannelProxy::MessageFilter* filter) = 0;
44 }; 41 };
45 42
46 // The RenderThread class represents a background thread where RenderView 43 // The RenderThread class represents a background thread where RenderView
(...skipping 16 matching lines...) Expand all
63 60
64 // Returns the one render thread for this process. Note that this should only 61 // Returns the one render thread for this process. Note that this should only
65 // be accessed when running on the render thread itself 62 // be accessed when running on the render thread itself
66 static RenderThread* current(); 63 static RenderThread* current();
67 64
68 // Overridded from RenderThreadBase. 65 // Overridded from RenderThreadBase.
69 virtual bool Send(IPC::Message* msg) { 66 virtual bool Send(IPC::Message* msg) {
70 return ChildThread::Send(msg); 67 return ChildThread::Send(msg);
71 } 68 }
72 69
73 virtual bool InSend() const {
74 return ChildThread::InSend();
75 }
76
77 virtual void AddRoute(int32 routing_id, IPC::Channel::Listener* listener) { 70 virtual void AddRoute(int32 routing_id, IPC::Channel::Listener* listener) {
78 return ChildThread::AddRoute(routing_id, listener); 71 return ChildThread::AddRoute(routing_id, listener);
79 } 72 }
80 virtual void RemoveRoute(int32 routing_id) { 73 virtual void RemoveRoute(int32 routing_id) {
81 return ChildThread::RemoveRoute(routing_id); 74 return ChildThread::RemoveRoute(routing_id);
82 } 75 }
83 76
84 virtual void AddFilter(IPC::ChannelProxy::MessageFilter* filter); 77 virtual void AddFilter(IPC::ChannelProxy::MessageFilter* filter);
85 virtual void RemoveFilter(IPC::ChannelProxy::MessageFilter* filter); 78 virtual void RemoveFilter(IPC::ChannelProxy::MessageFilter* filter);
86 79
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 scoped_ptr<RenderDnsMaster> render_dns_master_; 125 scoped_ptr<RenderDnsMaster> render_dns_master_;
133 126
134 scoped_ptr<ScopedRunnableMethodFactory<RenderThread> > cache_stats_factory_; 127 scoped_ptr<ScopedRunnableMethodFactory<RenderThread> > cache_stats_factory_;
135 128
136 scoped_ptr<NotificationService> notification_service_; 129 scoped_ptr<NotificationService> notification_service_;
137 130
138 DISALLOW_COPY_AND_ASSIGN(RenderThread); 131 DISALLOW_COPY_AND_ASSIGN(RenderThread);
139 }; 132 };
140 133
141 #endif // CHROME_RENDERER_RENDER_THREAD_H_ 134 #endif // CHROME_RENDERER_RENDER_THREAD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698