diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-11 04:03:40 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-11 04:03:40 +0000 |
commit | e4612da65df7f8764f342d0a18edb58e316881aa (patch) | |
tree | 0456be800a6775c51583b848fff3e8912c3bf6f4 /ash | |
parent | f5e48efdedc31d00f6a7ccda5be9ed34c11357f6 (diff) | |
download | chromium_src-e4612da65df7f8764f342d0a18edb58e316881aa.zip chromium_src-e4612da65df7f8764f342d0a18edb58e316881aa.tar.gz chromium_src-e4612da65df7f8764f342d0a18edb58e316881aa.tar.bz2 |
Revert 117165 - Allow a Views client to provide a default frameview for window widgets.
Provides a default one in Ash that will be used to match kennedy-spec.
Much tweaking is needed, but that can come in future CLs.
http://crbug.com/109138
TEST=none
Review URL: http://codereview.chromium.org/9166014
TBR=ben@chromium.org
Review URL: http://codereview.chromium.org/9166035
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117168 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r-- | ash/ash.gyp | 2 | ||||
-rw-r--r-- | ash/ash_switches.cc | 3 | ||||
-rw-r--r-- | ash/ash_switches.h | 1 | ||||
-rw-r--r-- | ash/shell.cc | 10 | ||||
-rw-r--r-- | ash/shell.h | 9 | ||||
-rw-r--r-- | ash/shell/shell_main.cc | 17 | ||||
-rw-r--r-- | ash/wm/modal_container_layout_manager.cc | 12 |
7 files changed, 2 insertions, 52 deletions
diff --git a/ash/ash.gyp b/ash/ash.gyp index 32d9cbb..3bc383e 100644 --- a/ash/ash.gyp +++ b/ash/ash.gyp @@ -107,8 +107,6 @@ 'wm/default_container_event_filter.h', 'wm/default_container_layout_manager.cc', 'wm/default_container_layout_manager.h', - 'wm/dialog_frame_view.cc', - 'wm/dialog_frame_view.h', 'wm/image_grid.cc', 'wm/image_grid.h', 'wm/modal_container_layout_manager.cc', diff --git a/ash/ash_switches.cc b/ash/ash_switches.cc index 30857a8..8ffd94b 100644 --- a/ash/ash_switches.cc +++ b/ash/ash_switches.cc @@ -11,9 +11,6 @@ namespace ash { namespace switches { -// Use Google-style dialog box frames. -const char kAuraGoogleDialogFrames[] = "aura-google-dialog-frames"; - // Avoid drawing drop shadows under windows. const char kAuraNoShadows[] = "aura-no-shadows"; diff --git a/ash/ash_switches.h b/ash/ash_switches.h index 65ba77d..2480bb6 100644 --- a/ash/ash_switches.h +++ b/ash/ash_switches.h @@ -12,7 +12,6 @@ namespace ash { namespace switches { // Please keep alphabetized. -ASH_EXPORT extern const char kAuraGoogleDialogFrames[]; ASH_EXPORT extern const char kAuraNoShadows[]; ASH_EXPORT extern const char kAuraTranslucentFrames[]; ASH_EXPORT extern const char kAuraViewsAppList[]; diff --git a/ash/shell.cc b/ash/shell.cc index 7d9863e..c2e04fe 100644 --- a/ash/shell.cc +++ b/ash/shell.cc @@ -22,7 +22,6 @@ #include "ash/wm/compact_status_area_layout_manager.h" #include "ash/wm/default_container_event_filter.h" #include "ash/wm/default_container_layout_manager.h" -#include "ash/wm/dialog_frame_view.h" #include "ash/wm/modal_container_layout_manager.h" #include "ash/wm/power_button_controller.h" #include "ash/wm/root_window_event_filter.h" @@ -395,15 +394,6 @@ bool Shell::IsModalWindowOpen() const { return !modal_container->children().empty(); } -views::NonClientFrameView* Shell::CreateDefaultNonClientFrameView( - views::Widget* widget) { - if (CommandLine::ForCurrentProcess()->HasSwitch( - switches::kAuraGoogleDialogFrames)) { - return new internal::DialogFrameView; - } - return NULL; -} - //////////////////////////////////////////////////////////////////////////////// // Shell, private: diff --git a/ash/shell.h b/ash/shell.h index 7bb5d0b..037b66f 100644 --- a/ash/shell.h +++ b/ash/shell.h @@ -27,10 +27,6 @@ namespace gfx { class Rect; class Size; } -namespace views { -class NonClientFrameView; -class Widget; -} namespace ash { @@ -92,11 +88,6 @@ class ASH_EXPORT Shell { // See enum WindowMode for details. bool IsWindowModeCompact() const { return window_mode_ == COMPACT_MODE; } - // Creates a default views::NonClientFrameView for use by windows in the - // Ash environment. - views::NonClientFrameView* CreateDefaultNonClientFrameView( - views::Widget* widget); - AcceleratorController* accelerator_controller() { return accelerator_controller_.get(); } diff --git a/ash/shell/shell_main.cc b/ash/shell/shell_main.cc index 5619d00..acbf788 100644 --- a/ash/shell/shell_main.cc +++ b/ash/shell/shell_main.cc @@ -26,21 +26,6 @@ namespace { -class ShellViewsDelegate : public views::TestViewsDelegate { - public: - ShellViewsDelegate() {} - virtual ~ShellViewsDelegate() {} - - // Overridden from views::TestViewsDelegate: - virtual views::NonClientFrameView* CreateDefaultNonClientFrameView( - views::Widget* widget) OVERRIDE { - return ash::Shell::GetInstance()->CreateDefaultNonClientFrameView(widget); - } - - private: - DISALLOW_COPY_AND_ASSIGN(ShellViewsDelegate); -}; - class ShellDelegateImpl : public ash::ShellDelegate { public: ShellDelegateImpl() { @@ -131,7 +116,7 @@ int main(int argc, char** argv) { // A ViewsDelegate is required. if (!views::ViewsDelegate::views_delegate) - views::ViewsDelegate::views_delegate = new ShellViewsDelegate; + views::ViewsDelegate::views_delegate = new views::TestViewsDelegate; ash::Shell::CreateInstance(new ShellDelegateImpl); diff --git a/ash/wm/modal_container_layout_manager.cc b/ash/wm/modal_container_layout_manager.cc index e4b8ea4..589305e 100644 --- a/ash/wm/modal_container_layout_manager.cc +++ b/ash/wm/modal_container_layout_manager.cc @@ -4,12 +4,10 @@ #include "ash/wm/modal_container_layout_manager.h" -#include "ash/ash_switches.h" #include "ash/shell.h" #include "ash/wm/modality_event_filter.h" #include "ash/wm/window_util.h" #include "base/bind.h" -#include "base/command_line.h" #include "ui/aura/client/aura_constants.h" #include "ui/aura/event.h" #include "ui/aura/root_window.h" @@ -32,18 +30,10 @@ class ScreenView : public views::View { // Overridden from views::View: virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE { - canvas->FillRect(GetOverlayColor(), GetLocalBounds()); + canvas->FillRect(SK_ColorBLACK, GetLocalBounds()); } private: - SkColor GetOverlayColor() { - if (CommandLine::ForCurrentProcess()->HasSwitch( - switches::kAuraGoogleDialogFrames)) { - return SK_ColorWHITE; - } - return SK_ColorBLACK; - } - DISALLOW_COPY_AND_ASSIGN(ScreenView); }; |