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

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

Issue 547253002: Ensure app install is aborted when the install dialog is closed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 (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_client_view.h" 5 #include "ui/views/window/dialog_client_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ui/events/keycodes/keyboard_codes.h" 9 #include "ui/events/keycodes/keyboard_codes.h"
10 #include "ui/views/background.h" 10 #include "ui/views/background.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 // The dialog is closing but no Accept or Cancel action has been performed 132 // The dialog is closing but no Accept or Cancel action has been performed
133 // before: it's a Close action. 133 // before: it's a Close action.
134 if (GetDialogDelegate()->Close()) { 134 if (GetDialogDelegate()->Close()) {
135 notified_delegate_ = true; 135 notified_delegate_ = true;
136 GetDialogDelegate()->OnClosed(); 136 GetDialogDelegate()->OnClosed();
137 return true; 137 return true;
138 } 138 }
139 return false; 139 return false;
140 } 140 }
141 141
142 void DialogClientView::WidgetClosing() {
143 if (!notified_delegate_)
tapted 2014/09/08 07:42:21 do you need `notified_delegate_ = true` here, and
tmdiep 2014/09/08 08:26:08 DialogClientView::Close() is called by AcceptWindo
tapted 2014/09/08 09:28:56 sg - so long as Close() is private/non-virtual I t
144 GetDialogDelegate()->OnClosed();
145 }
146
142 DialogClientView* DialogClientView::AsDialogClientView() { 147 DialogClientView* DialogClientView::AsDialogClientView() {
143 return this; 148 return this;
144 } 149 }
145 150
146 const DialogClientView* DialogClientView::AsDialogClientView() const { 151 const DialogClientView* DialogClientView::AsDialogClientView() const {
147 return this; 152 return this;
148 } 153 }
149 154
150 void DialogClientView::OnWillChangeFocus(View* focused_before, 155 void DialogClientView::OnWillChangeFocus(View* focused_before,
151 View* focused_now) { 156 View* focused_now) {
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 gfx::Insets(0, kButtonHEdgeMarginNew, 424 gfx::Insets(0, kButtonHEdgeMarginNew,
420 kButtonVEdgeMarginNew, kButtonHEdgeMarginNew); 425 kButtonVEdgeMarginNew, kButtonHEdgeMarginNew);
421 } 426 }
422 427
423 void DialogClientView::Close() { 428 void DialogClientView::Close() {
424 GetWidget()->Close(); 429 GetWidget()->Close();
425 GetDialogDelegate()->OnClosed(); 430 GetDialogDelegate()->OnClosed();
426 } 431 }
427 432
428 } // namespace views 433 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698