summaryrefslogtreecommitdiffstats
path: root/chrome/browser/printing/printing_ui_web_contents_observer.cc
blob: 311d62192f9849d2cea8b21baa2f6c534213be74 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// 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 "chrome/browser/printing/printing_ui_web_contents_observer.h"

#include "content/public/browser/browser_thread.h"
#include "content/public/browser/web_contents.h"

PrintingUIWebContentsObserver::PrintingUIWebContentsObserver(
    content::WebContents* web_contents)
    : content::WebContentsObserver(web_contents) {
  DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
}

gfx::NativeView PrintingUIWebContentsObserver::GetParentView() {
  DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
  return web_contents() ? web_contents()->GetNativeView() : NULL;
}