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

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

Issue 560030: Refactored out JS specific part of modal dialog stack into its own class, exp... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/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')
Property Changes:
Name: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2006-2008 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 "views/window/window.h"
8
9 void ModalDialogDelegate::ShowModalDialog() {
10 gfx::NativeWindow root_hwnd = GetDialogRootWindow();
11 // GetMessageBoxRootWindow() will be NULL if there's no selected tab (e.g.,
12 // during shutdown), in which case we simply skip showing this dialog.
13 if (!root_hwnd) {
14 Cancel();
15 } else {
16 dialog_ = views::Window::CreateChromeWindow(root_hwnd, gfx::Rect(), this);
17 dialog_->Show();
18 }
19 }
20
21 void ModalDialogDelegate::ActivateModalDialog() {
22 // Ensure that the dialog is visible and at the top of the z-order. These
23 // conditions may not be true if the dialog was opened on a different virtual
24 // desktop to the one the browser window is on.
25 dialog_->Show();
26 dialog_->Activate();
27 }
28
29 void ModalDialogDelegate::CloseModalDialog() {
30 // If the dialog is visible close it.
31 if (dialog_)
32 dialog_->Close();
33 }
34
35 ModalDialogDelegate::ModalDialogDelegate() : dialog_(NULL) {
36 }
37
OLDNEW
« no previous file with comments | « chrome/browser/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