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

Side by Side Diff: content/public/renderer/render_view_observer.h

Issue 302553007: Call RenderViewImpl::SetScreenOrientationForTesting to make sure that events are not sent when orie… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Now ResetMockScreenOrientationForTesting() is called on every layout test finish, so replaced DCHEC… Created 6 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
« no previous file with comments | « no previous file | content/public/renderer/render_view_observer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_PUBLIC_RENDERER_RENDER_VIEW_OBSERVER_H_ 5 #ifndef CONTENT_PUBLIC_RENDERER_RENDER_VIEW_OBSERVER_H_
6 #define CONTENT_PUBLIC_RENDERER_RENDER_VIEW_OBSERVER_H_ 6 #define CONTENT_PUBLIC_RENDERER_RENDER_VIEW_OBSERVER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 // IPC::Sender implementation. 102 // IPC::Sender implementation.
103 virtual bool Send(IPC::Message* message) OVERRIDE; 103 virtual bool Send(IPC::Message* message) OVERRIDE;
104 104
105 RenderView* render_view() const; 105 RenderView* render_view() const;
106 int routing_id() const { return routing_id_; } 106 int routing_id() const { return routing_id_; }
107 107
108 protected: 108 protected:
109 explicit RenderViewObserver(RenderView* render_view); 109 explicit RenderViewObserver(RenderView* render_view);
110 virtual ~RenderViewObserver(); 110 virtual ~RenderViewObserver();
111 111
112 // Sets |render_view_| to track.
113 // Removes itself of previous (if any) |render_view_| observer list and adds
114 // to the new |render_view|. Since it assumes that observer outlives
115 // render_view, OnDestruct should be overridden.
116 void Observe(RenderView* render_view);
117
112 private: 118 private:
113 friend class RenderViewImpl; 119 friend class RenderViewImpl;
114 120
115 // This is called by the RenderView when it's going away so that this object 121 // This is called by the RenderView when it's going away so that this object
116 // can null out its pointer. 122 // can null out its pointer.
117 void RenderViewGone(); 123 void RenderViewGone();
118 124
119 RenderView* render_view_; 125 RenderView* render_view_;
120 // The routing ID of the associated RenderView. 126 // The routing ID of the associated RenderView.
121 int routing_id_; 127 int routing_id_;
122 128
123 DISALLOW_COPY_AND_ASSIGN(RenderViewObserver); 129 DISALLOW_COPY_AND_ASSIGN(RenderViewObserver);
124 }; 130 };
125 131
126 } // namespace content 132 } // namespace content
127 133
128 #endif // CONTENT_PUBLIC_RENDERER_RENDER_VIEW_OBSERVER_H_ 134 #endif // CONTENT_PUBLIC_RENDERER_RENDER_VIEW_OBSERVER_H_
OLDNEW
« no previous file with comments | « no previous file | content/public/renderer/render_view_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698