printing_ui_web_contents_observer.cc 778 B

1234567891011121314151617181920
  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.
  4. #include "chrome/browser/printing/printing_ui_web_contents_observer.h"
  5. #include "content/public/browser/browser_thread.h"
  6. #include "content/public/browser/web_contents.h"
  7. PrintingUIWebContentsObserver::PrintingUIWebContentsObserver(
  8. content::WebContents* web_contents)
  9. : content::WebContentsObserver(web_contents) {
  10. DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
  11. }
  12. gfx::NativeView PrintingUIWebContentsObserver::GetParentView() {
  13. DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
  14. return web_contents() ? web_contents()->GetNativeView() : NULL;
  15. }