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

Side by Side Diff: ui/views/window/dialog_delegate.cc

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: reduced diff 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
« ui/views/widget/widget.h ('K') | « ui/views/widget/widget_delegate.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "ui/views/window/dialog_delegate.h" 5 #include "ui/views/window/dialog_delegate.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 #endif 75 #endif
76 } 76 }
77 params.context = context; 77 params.context = context;
78 params.parent = parent; 78 params.parent = parent;
79 #if !defined(OS_MACOSX) 79 #if !defined(OS_MACOSX)
80 // Web-modal (ui::MODAL_TYPE_CHILD) dialogs with parents are marked as child 80 // Web-modal (ui::MODAL_TYPE_CHILD) dialogs with parents are marked as child
81 // widgets to prevent top-level window behavior (independent movement, etc). 81 // widgets to prevent top-level window behavior (independent movement, etc).
82 // On Mac, however, the parent may be a native window (not a views::Widget), 82 // On Mac, however, the parent may be a native window (not a views::Widget),
83 // and so the dialog must be considered top-level to gain focus and input 83 // and so the dialog must be considered top-level to gain focus and input
84 // method behaviors. 84 // method behaviors.
85 params.child = parent && (delegate->GetModalType() == ui::MODAL_TYPE_CHILD); 85 params.child = parent && (delegate->GetModalType() == ui::MODAL_TYPE_CHILD)
86 && !delegate->IsTopLevel();
86 #endif 87 #endif
87 return params; 88 return params;
88 } 89 }
89 90
90 View* DialogDelegate::CreateExtraView() { 91 View* DialogDelegate::CreateExtraView() {
91 return NULL; 92 return NULL;
92 } 93 }
93 94
94 bool DialogDelegate::GetExtraViewPadding(int* padding) { 95 bool DialogDelegate::GetExtraViewPadding(int* padding) {
95 return false; 96 return false;
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 state->role = ui::AX_ROLE_DIALOG; 254 state->role = ui::AX_ROLE_DIALOG;
254 } 255 }
255 256
256 void DialogDelegateView::ViewHierarchyChanged( 257 void DialogDelegateView::ViewHierarchyChanged(
257 const ViewHierarchyChangedDetails& details) { 258 const ViewHierarchyChangedDetails& details) {
258 if (details.is_add && details.child == this && GetWidget()) 259 if (details.is_add && details.child == this && GetWidget())
259 NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true); 260 NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true);
260 } 261 }
261 262
262 } // namespace views 263 } // namespace views
OLDNEW
« ui/views/widget/widget.h ('K') | « ui/views/widget/widget_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698