Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(325)

Side by Side Diff: components/constrained_window/native_web_contents_modal_dialog_manager_views.h

Issue 2172363002: Created min size for print preview dialog and modified to allow the Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Modify tracking of nonclipped state for new code structure. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_CONSTRAINED_WINDOW_NATIVE_WEB_CONTENTS_MODAL_DIALOG_MANAGER_V IEWS_H_ 5 #ifndef COMPONENTS_CONSTRAINED_WINDOW_NATIVE_WEB_CONTENTS_MODAL_DIALOG_MANAGER_V IEWS_H_
6 #define COMPONENTS_CONSTRAINED_WINDOW_NATIVE_WEB_CONTENTS_MODAL_DIALOG_MANAGER_V IEWS_H_ 6 #define COMPONENTS_CONSTRAINED_WINDOW_NATIVE_WEB_CONTENTS_MODAL_DIALOG_MANAGER_V IEWS_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "components/web_modal/modal_dialog_host.h" 11 #include "components/web_modal/modal_dialog_host.h"
12 #include "components/web_modal/single_web_contents_dialog_manager.h" 12 #include "components/web_modal/single_web_contents_dialog_manager.h"
13 #include "ui/gfx/native_widget_types.h" 13 #include "ui/gfx/native_widget_types.h"
14 #include "ui/views/widget/widget_observer.h" 14 #include "ui/views/widget/widget_observer.h"
15 15
16 namespace views { 16 namespace views {
17 class Widget; 17 class Widget;
18 } 18 }
19 19
20 namespace constrained_window { 20 namespace constrained_window {
21 21
22 // Class for parenting a tab-modal views dialog off of a views browser. 22 // Class for parenting a tab-modal views dialog off of a views browser.
23 class NativeWebContentsModalDialogManagerViews 23 class NativeWebContentsModalDialogManagerViews
24 : public web_modal::SingleWebContentsDialogManager, 24 : public web_modal::SingleWebContentsDialogManager,
25 public web_modal::ModalDialogHostObserver, 25 public web_modal::ModalDialogHostObserver,
26 public views::WidgetObserver { 26 public views::WidgetObserver {
27 public: 27 public:
28 NativeWebContentsModalDialogManagerViews( 28 NativeWebContentsModalDialogManagerViews(
29 gfx::NativeWindow dialog, 29 gfx::NativeWindow dialog,
30 web_modal::SingleWebContentsDialogManagerDelegate* native_delegate); 30 web_modal::SingleWebContentsDialogManagerDelegate* native_delegate,
31 bool is_nonclipped);
31 32
32 ~NativeWebContentsModalDialogManagerViews() override; 33 ~NativeWebContentsModalDialogManagerViews() override;
33 34
34 // Sets up this object to manage the |dialog_|. Registers for closing events 35 // Sets up this object to manage the |dialog_|. Registers for closing events
35 // in order to notify the delegate. 36 // in order to notify the delegate. If |is_nonclipped| is true and the
36 void ManageDialog(); 37 // platform supports non-clipped dialogs (currently Chrome OS only), the
38 // dialog will not be confined to the bounds of its parent window.
39 void ManageDialog(bool is_nonclipped);
37 40
38 // web_modal::SingleWebContentsDialogManager: 41 // web_modal::SingleWebContentsDialogManager:
39 void Show() override; 42 void Show() override;
40 void Hide() override; 43 void Hide() override;
41 void Close() override; 44 void Close() override;
42 void Focus() override; 45 void Focus() override;
43 void Pulse() override; 46 void Pulse() override;
44 47
45 // web_modal::ModalDialogHostObserver: 48 // web_modal::ModalDialogHostObserver:
46 void OnPositionRequiresUpdate() override; 49 void OnPositionRequiresUpdate() override;
(...skipping 24 matching lines...) Expand all
71 bool host_destroying_; 74 bool host_destroying_;
72 std::set<views::Widget*> observed_widgets_; 75 std::set<views::Widget*> observed_widgets_;
73 std::set<views::Widget*> shown_widgets_; 76 std::set<views::Widget*> shown_widgets_;
74 77
75 DISALLOW_COPY_AND_ASSIGN(NativeWebContentsModalDialogManagerViews); 78 DISALLOW_COPY_AND_ASSIGN(NativeWebContentsModalDialogManagerViews);
76 }; 79 };
77 80
78 } // namespace constrained_window 81 } // namespace constrained_window
79 82
80 #endif // COMPONENTS_CONSTRAINED_WINDOW_NATIVE_WEB_CONTENTS_MODAL_DIALOG_MANAGE R_VIEWS_H_ 83 #endif // COMPONENTS_CONSTRAINED_WINDOW_NATIVE_WEB_CONTENTS_MODAL_DIALOG_MANAGE R_VIEWS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698