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

Side by Side Diff: chrome/browser/ui/views/modal_dialog_delegate.cc

Issue 5869001: Remove unused ModalDialogDelegate class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/views/modal_dialog_delegate.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2010 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 "chrome/browser/views/modal_dialog_delegate.h"
6
7 #include "base/logging.h"
8 #include "chrome/browser/views/window.h"
9 #include "views/window/window.h"
10
11 void ModalDialogDelegate::ShowModalDialog() {
12 gfx::NativeWindow root_hwnd = GetDialogRootWindow();
13 // GetMessageBoxRootWindow() will be NULL if there's no selected tab (e.g.,
14 // during shutdown), in which case we simply skip showing this dialog.
15 if (!root_hwnd) {
16 Cancel();
17 } else {
18 dialog_ = browser::CreateViewsWindow(root_hwnd, gfx::Rect(), this);
19 dialog_->Show();
20 }
21 }
22
23 void ModalDialogDelegate::ActivateModalDialog() {
24 DCHECK(dialog_);
25 // Ensure that the dialog is visible and at the top of the z-order. These
26 // conditions may not be true if the dialog was opened on a different virtual
27 // desktop to the one the browser window is on.
28 dialog_->Show();
29 dialog_->Activate();
30 }
31
32 void ModalDialogDelegate::CloseModalDialog() {
33 // If the dialog is visible close it.
34 if (dialog_)
35 dialog_->Close();
36 }
37
38 ModalDialogDelegate::ModalDialogDelegate() : dialog_(NULL) {
39 }
40
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/modal_dialog_delegate.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698