| OLD | NEW |
| 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 "ash/shell/window_type_launcher.h" | 5 #include "ash/shell/window_type_launcher.h" |
| 6 | 6 |
| 7 #include "ash/shell_window_ids.h" | 7 #include "ash/shell_window_ids.h" |
| 8 #include "ash/shell/example_factory.h" | 8 #include "ash/shell/example_factory.h" |
| 9 #include "ash/shell/panel_window.h" | 9 #include "ash/shell/panel_window.h" |
| 10 #include "ash/shell/toplevel_window.h" | 10 #include "ash/shell/toplevel_window.h" |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 views::Widget* NonModalTransient::non_modal_transient_ = NULL; | 164 views::Widget* NonModalTransient::non_modal_transient_ = NULL; |
| 165 | 165 |
| 166 } // namespace | 166 } // namespace |
| 167 | 167 |
| 168 void InitWindowTypeLauncher() { | 168 void InitWindowTypeLauncher() { |
| 169 views::Widget* widget = | 169 views::Widget* widget = |
| 170 views::Widget::CreateWindowWithBounds(new WindowTypeLauncher, | 170 views::Widget::CreateWindowWithBounds(new WindowTypeLauncher, |
| 171 gfx::Rect(120, 150, 400, 400)); | 171 gfx::Rect(120, 150, 400, 400)); |
| 172 widget->GetNativeView()->SetName("WindowTypeLauncher"); | 172 widget->GetNativeView()->SetName("WindowTypeLauncher"); |
| 173 ash::internal::SetShadowType(widget->GetNativeView(), | 173 ash::internal::SetShadowType(widget->GetNativeView(), |
| 174 ash::internal::SHADOW_TYPE_NONE); | 174 ash::internal::SHADOW_TYPE_RECTANGULAR); |
| 175 widget->Show(); | 175 widget->Show(); |
| 176 } | 176 } |
| 177 | 177 |
| 178 WindowTypeLauncher::WindowTypeLauncher() | 178 WindowTypeLauncher::WindowTypeLauncher() |
| 179 : ALLOW_THIS_IN_INITIALIZER_LIST(create_button_( | 179 : ALLOW_THIS_IN_INITIALIZER_LIST(create_button_( |
| 180 new views::NativeTextButton(this, ASCIIToUTF16("Create Window")))), | 180 new views::NativeTextButton(this, ASCIIToUTF16("Create Window")))), |
| 181 ALLOW_THIS_IN_INITIALIZER_LIST(panel_button_( | 181 ALLOW_THIS_IN_INITIALIZER_LIST(panel_button_( |
| 182 new views::NativeTextButton(this, ASCIIToUTF16("Create Panel")))), | 182 new views::NativeTextButton(this, ASCIIToUTF16("Create Panel")))), |
| 183 ALLOW_THIS_IN_INITIALIZER_LIST(create_nonresizable_button_( | 183 ALLOW_THIS_IN_INITIALIZER_LIST(create_nonresizable_button_( |
| 184 new views::NativeTextButton( | 184 new views::NativeTextButton( |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 menu_runner_.reset(new MenuRunner(root)); | 374 menu_runner_.reset(new MenuRunner(root)); |
| 375 if (menu_runner_->RunMenuAt(GetWidget(), NULL, gfx::Rect(p, gfx::Size(0, 0)), | 375 if (menu_runner_->RunMenuAt(GetWidget(), NULL, gfx::Rect(p, gfx::Size(0, 0)), |
| 376 MenuItemView::TOPLEFT, | 376 MenuItemView::TOPLEFT, |
| 377 MenuRunner::HAS_MNEMONICS) == MenuRunner::MENU_DELETED) | 377 MenuRunner::HAS_MNEMONICS) == MenuRunner::MENU_DELETED) |
| 378 return; | 378 return; |
| 379 } | 379 } |
| 380 #endif // !defined(OS_MACOSX) | 380 #endif // !defined(OS_MACOSX) |
| 381 | 381 |
| 382 } // namespace shell | 382 } // namespace shell |
| 383 } // namespace ash | 383 } // namespace ash |
| OLD | NEW |