summaryrefslogtreecommitdiffstats
path: root/content/browser/renderer_host/render_frame_host_impl.cc
blob: ea511d0b8c38d14a376281979fa7989e66ca3e51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "content/browser/renderer_host/render_frame_host_impl.h"

#include "content/browser/renderer_host/render_view_host_impl.h"

namespace content {

RenderFrameHostImpl::RenderFrameHostImpl(
    RenderViewHostImpl* render_view_host,
    int routing_id,
    bool swapped_out)
    : render_view_host_(render_view_host),
      routing_id_(routing_id) {
}

RenderFrameHostImpl::~RenderFrameHostImpl() {
}

bool RenderFrameHostImpl::Send(IPC::Message* message) {
  // Use the RenderViewHost object to send the message. It inherits it from
  // RenderWidgetHost, which ultimately uses the current process's |Send|.
  return render_view_host_->Send(message);
}

bool RenderFrameHostImpl::OnMessageReceived(const IPC::Message &msg) {
  // Pass the message up to the RenderViewHost, until we have enough
  // infrastructure to start processing messages in this object.
  return render_view_host_->OnMessageReceived(msg);
}

}  // namespace content