Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / printing / printing_ui_web_contents_observer.cc
blob03a09f7009cb7f5e4f3f720e58fa5d0a665a0931
1 // Copyright 2013 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.
5 #include "chrome/browser/printing/printing_ui_web_contents_observer.h"
7 #include "content/public/browser/browser_thread.h"
8 #include "content/public/browser/web_contents.h"
9 #include "content/public/browser/web_contents_view.h"
11 PrintingUIWebContentsObserver::PrintingUIWebContentsObserver(
12 content::WebContents* web_contents)
13 : content::WebContentsObserver(web_contents) {
14 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
17 gfx::NativeView PrintingUIWebContentsObserver::GetParentView() {
18 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
19 return web_contents() ? web_contents()->GetView()->GetNativeView() : NULL;