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
3// found in the LICENSE file.
4
5#include "chrome/browser/tab_contents/tab_util.h"
6
7#include "content/browser/renderer_host/render_process_host.h"
8#include "content/browser/renderer_host/render_view_host.h"
9#include "content/browser/tab_contents/tab_contents.h"
10
11TabContents* tab_util::GetTabContentsByID(int render_process_id,
12                                          int render_view_id) {
13  RenderViewHost* render_view_host =
14      RenderViewHost::FromID(render_process_id, render_view_id);
15  if (!render_view_host)
16    return NULL;
17
18  return render_view_host->delegate()->GetAsTabContents();
19}
20