Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 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 CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_PROXY_HOST_H_ | |
| 6 #define CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_PROXY_HOST_H_ | |
| 7 | |
| 8 #include "base/memory/scoped_ptr.h" | |
| 9 #include "content/browser/frame_host/render_frame_host_impl.h" | |
| 10 | |
| 11 class RenderProcessHost; | |
| 12 class RenderFrameHostImpl; | |
| 13 class RenderViewHostImpl; | |
| 14 | |
| 15 namespace content { | |
| 16 | |
| 17 class RenderFrameProxyHost { | |
|
Charlie Reis
2014/03/31 23:22:35
This class needs a big helpful comment. Some thin
nasko
2014/04/09 17:52:01
Done.
| |
| 18 public: | |
| 19 explicit RenderFrameProxyHost( | |
| 20 scoped_ptr<RenderFrameHostImpl> render_frame_host); | |
| 21 ~RenderFrameProxyHost(); | |
| 22 | |
| 23 RenderProcessHost* GetProcess() { | |
| 24 DCHECK(render_frame_host_.get()); | |
|
Charlie Reis
2014/03/31 23:22:35
This is kind of redundant, since we'll crash on th
nasko
2014/04/09 17:52:01
Done.
| |
| 25 return render_frame_host_->GetProcess(); | |
| 26 } | |
| 27 RenderFrameHostImpl* render_frame_host() { | |
| 28 return render_frame_host_.get(); | |
| 29 } | |
| 30 RenderViewHostImpl* render_view_host() { | |
| 31 if (render_frame_host_) | |
|
Charlie Reis
2014/03/31 23:22:35
When is this not null? Does the RFPH ever outlive
nasko
2014/04/09 17:52:01
Done.
| |
| 32 return render_frame_host_->render_view_host(); | |
| 33 return NULL; | |
| 34 } | |
| 35 scoped_ptr<RenderFrameHostImpl> PassFrameHost() { | |
| 36 return render_frame_host_.Pass(); | |
| 37 } | |
| 38 | |
| 39 private: | |
| 40 | |
| 41 // TODO(nasko): For now, hide the RenderFrameHost inside the proxy, but remove | |
| 42 // it once we have all the code support for proper proxy objects. | |
| 43 scoped_ptr<RenderFrameHostImpl> render_frame_host_; | |
| 44 | |
| 45 DISALLOW_COPY_AND_ASSIGN(RenderFrameProxyHost); | |
| 46 }; | |
| 47 | |
| 48 } // namespace | |
| 49 | |
| 50 #endif // CONTENT_BROWSER_FRAME_HOST_RENDER_FRAME_PROXY_HOST_H_ | |
| OLD | NEW |