diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-06 03:52:12 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-06 03:52:12 +0000 |
commit | 2a906c0076ac3f7efd17450f12869c7c3429f983 (patch) | |
tree | 82b9d94ea5c21f609aed47432208dd4212fc6290 /ash | |
parent | 42c86025c01c567bbfaeceeb21a900baa21ed14e (diff) | |
download | chromium_src-2a906c0076ac3f7efd17450f12869c7c3429f983.zip chromium_src-2a906c0076ac3f7efd17450f12869c7c3429f983.tar.gz chromium_src-2a906c0076ac3f7efd17450f12869c7c3429f983.tar.bz2 |
Makes Widget modality a 3-state type rather than a boolean.
There are actually two types of modality that the WM might care about - window modality and system modality. See the definitions of these in ui/base/ui_base_types.h.
This is a precursor to adding support for window modality to Ash. Right now we only do system modality which is undesirable for almost all cases of window modality.
http://crbug.com/109290
TEST=none
Review URL: http://codereview.chromium.org/9109035
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116644 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r-- | ash/shell/window_type_launcher.cc | 6 | ||||
-rw-r--r-- | ash/shell_unittest.cc | 4 | ||||
-rw-r--r-- | ash/wm/modal_container_layout_manager_unittest.cc | 6 |
3 files changed, 8 insertions, 8 deletions
diff --git a/ash/shell/window_type_launcher.cc b/ash/shell/window_type_launcher.cc index 49c10e4..2113197 100644 --- a/ash/shell/window_type_launcher.cc +++ b/ash/shell/window_type_launcher.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -79,8 +79,8 @@ class ModalWindow : public views::WidgetDelegateView, virtual string16 GetWindowTitle() const OVERRIDE { return ASCIIToUTF16("Modal Window"); } - virtual bool IsModal() const OVERRIDE { - return true; + virtual ui::ModalType GetModalType() const OVERRIDE { + return ui::MODAL_TYPE_WINDOW; } // Overridden from views::ButtonListener: diff --git a/ash/shell_unittest.cc b/ash/shell_unittest.cc index cab9f9f..22b3209 100644 --- a/ash/shell_unittest.cc +++ b/ash/shell_unittest.cc @@ -65,8 +65,8 @@ class ModalWindow : public views::WidgetDelegateView { virtual string16 GetWindowTitle() const OVERRIDE { return ASCIIToUTF16("Modal Window"); } - virtual bool IsModal() const OVERRIDE { - return true; + virtual ui::ModalType GetModalType() const OVERRIDE { + return ui::MODAL_TYPE_WINDOW; } private: diff --git a/ash/wm/modal_container_layout_manager_unittest.cc b/ash/wm/modal_container_layout_manager_unittest.cc index a9901ad..744bfb4 100644 --- a/ash/wm/modal_container_layout_manager_unittest.cc +++ b/ash/wm/modal_container_layout_manager_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -52,8 +52,8 @@ class TestWindow : public views::WidgetDelegateView { virtual views::View* GetContentsView() OVERRIDE { return this; } - virtual bool IsModal() const OVERRIDE { - return modal_; + virtual ui::ModalType GetModalType() const OVERRIDE { + return modal_ ? ui::MODAL_TYPE_WINDOW : ui::MODAL_TYPE_NONE; } private: |