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

Side by Side Diff: content/browser/renderer_host/render_widget_host_impl.h

Issue 10662005: Use IPC::Sender and IPC::Listener in content. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <deque> 9 #include <deque>
10 #include <string> 10 #include <string>
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 namespace content { 49 namespace content {
50 50
51 class RenderWidgetHostDelegate; 51 class RenderWidgetHostDelegate;
52 class RenderWidgetHostViewPort; 52 class RenderWidgetHostViewPort;
53 class TapSuppressionController; 53 class TapSuppressionController;
54 54
55 // This implements the RenderWidgetHost interface that is exposed to 55 // This implements the RenderWidgetHost interface that is exposed to
56 // embedders of content, and adds things only visible to content. 56 // embedders of content, and adds things only visible to content.
57 class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost, 57 class CONTENT_EXPORT RenderWidgetHostImpl : virtual public RenderWidgetHost,
58 public IPC::Channel::Listener { 58 public IPC::Listener {
59 public: 59 public:
60 // routing_id can be MSG_ROUTING_NONE, in which case the next available 60 // routing_id can be MSG_ROUTING_NONE, in which case the next available
61 // routing id is taken from the RenderProcessHost. 61 // routing id is taken from the RenderProcessHost.
62 RenderWidgetHostImpl(RenderWidgetHostDelegate* delegate, 62 RenderWidgetHostImpl(RenderWidgetHostDelegate* delegate,
63 RenderProcessHost* process, 63 RenderProcessHost* process,
64 int routing_id); 64 int routing_id);
65 virtual ~RenderWidgetHostImpl(); 65 virtual ~RenderWidgetHostImpl();
66 66
67 // Use RenderWidgetHostImpl::From(rwh) to downcast a 67 // Use RenderWidgetHostImpl::From(rwh) to downcast a
68 // RenderWidgetHost to a RenderWidgetHostImpl. Internally, this 68 // RenderWidgetHost to a RenderWidgetHostImpl. Internally, this
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 base::PropertyBag* property_bag() { return &property_bag_; } 139 base::PropertyBag* property_bag() { return &property_bag_; }
140 140
141 // Called when a renderer object already been created for this host, and we 141 // Called when a renderer object already been created for this host, and we
142 // just need to be attached to it. Used for window.open, <select> dropdown 142 // just need to be attached to it. Used for window.open, <select> dropdown
143 // menus, and other times when the renderer initiates creating an object. 143 // menus, and other times when the renderer initiates creating an object.
144 void Init(); 144 void Init();
145 145
146 // Tells the renderer to die and then calls Destroy(). 146 // Tells the renderer to die and then calls Destroy().
147 virtual void Shutdown(); 147 virtual void Shutdown();
148 148
149 // IPC::Channel::Listener 149 // IPC::Listener
150 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; 150 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
151 151
152 // Sends a message to the corresponding object in the renderer. 152 // Sends a message to the corresponding object in the renderer.
153 virtual bool Send(IPC::Message* msg) OVERRIDE; 153 virtual bool Send(IPC::Message* msg) OVERRIDE;
154 154
155 // Called to notify the RenderWidget that it has been hidden or restored from 155 // Called to notify the RenderWidget that it has been hidden or restored from
156 // having been hidden. 156 // having been hidden.
157 void WasHidden(); 157 void WasHidden();
158 void WasRestored(); 158 void WasRestored();
159 bool IsHidden() const { return is_hidden_; } 159 bool IsHidden() const { return is_hidden_; }
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; 760 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_;
761 761
762 scoped_ptr<TapSuppressionController> tap_suppression_controller_; 762 scoped_ptr<TapSuppressionController> tap_suppression_controller_;
763 763
764 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); 764 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl);
765 }; 765 };
766 766
767 } // namespace content 767 } // namespace content
768 768
769 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 769 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698