• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2014 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 "libcef/browser/printing/constrained_window_views_client.h"
6 
7 #include "base/logging.h"
8 #include "base/memory/ptr_util.h"
9 #include "base/notreached.h"
10 #include "chrome/browser/platform_util.h"
11 #include "chrome/browser/ui/browser_finder.h"
12 #include "components/web_modal/web_contents_modal_dialog_host.h"
13 
14 namespace {
15 
16 class CefConstrainedWindowViewsClient
17     : public constrained_window::ConstrainedWindowViewsClient {
18  public:
CefConstrainedWindowViewsClient()19   CefConstrainedWindowViewsClient() {}
20 
21   CefConstrainedWindowViewsClient(const CefConstrainedWindowViewsClient&) =
22       delete;
23   CefConstrainedWindowViewsClient& operator=(
24       const CefConstrainedWindowViewsClient&) = delete;
25 
~CefConstrainedWindowViewsClient()26   ~CefConstrainedWindowViewsClient() override {}
27 
28  private:
29   // ConstrainedWindowViewsClient:
GetModalDialogHost(gfx::NativeWindow parent)30   web_modal::ModalDialogHost* GetModalDialogHost(
31       gfx::NativeWindow parent) override {
32     NOTREACHED();
33     return nullptr;
34   }
GetDialogHostView(gfx::NativeWindow parent)35   gfx::NativeView GetDialogHostView(gfx::NativeWindow parent) override {
36     NOTREACHED();
37     return gfx::NativeView();
38   }
39 };
40 
41 }  // namespace
42 
43 std::unique_ptr<constrained_window::ConstrainedWindowViewsClient>
CreateCefConstrainedWindowViewsClient()44 CreateCefConstrainedWindowViewsClient() {
45   return base::WrapUnique(new CefConstrainedWindowViewsClient);
46 }