| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "ash/common/session/session_state_delegate.h" | 9 #include "ash/common/session/session_state_delegate.h" |
| 10 #include "ash/common/system/status_area_widget.h" | 10 #include "ash/common/system/status_area_widget.h" |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 layout->AddPaddingRow(0, 5); | 158 layout->AddPaddingRow(0, 5); |
| 159 } | 159 } |
| 160 | 160 |
| 161 } // namespace | 161 } // namespace |
| 162 | 162 |
| 163 void InitWindowTypeLauncher() { | 163 void InitWindowTypeLauncher() { |
| 164 views::Widget* widget = views::Widget::CreateWindowWithContextAndBounds( | 164 views::Widget* widget = views::Widget::CreateWindowWithContextAndBounds( |
| 165 new WindowTypeLauncher, Shell::GetPrimaryRootWindow(), | 165 new WindowTypeLauncher, Shell::GetPrimaryRootWindow(), |
| 166 gfx::Rect(120, 150, 300, 410)); | 166 gfx::Rect(120, 150, 300, 410)); |
| 167 widget->GetNativeView()->SetName("WindowTypeLauncher"); | 167 widget->GetNativeView()->SetName("WindowTypeLauncher"); |
| 168 ::wm::SetShadowType(widget->GetNativeView(), ::wm::SHADOW_TYPE_RECTANGULAR); | 168 ::wm::SetShadowElevation(widget->GetNativeView(), |
| 169 ::wm::ShadowElevation::MEDIUM); |
| 169 widget->Show(); | 170 widget->Show(); |
| 170 } | 171 } |
| 171 | 172 |
| 172 WindowTypeLauncher::WindowTypeLauncher() | 173 WindowTypeLauncher::WindowTypeLauncher() |
| 173 : create_button_( | 174 : create_button_( |
| 174 MdTextButton::Create(this, base::ASCIIToUTF16("Create Window"))), | 175 MdTextButton::Create(this, base::ASCIIToUTF16("Create Window"))), |
| 175 panel_button_( | 176 panel_button_( |
| 176 MdTextButton::Create(this, base::ASCIIToUTF16("Create Panel"))), | 177 MdTextButton::Create(this, base::ASCIIToUTF16("Create Panel"))), |
| 177 create_nonresizable_button_(MdTextButton::Create( | 178 create_nonresizable_button_(MdTextButton::Create( |
| 178 this, | 179 this, |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 views::MenuRunner::ASYNC)); | 336 views::MenuRunner::ASYNC)); |
| 336 if (menu_runner_->RunMenuAt(GetWidget(), NULL, gfx::Rect(point, gfx::Size()), | 337 if (menu_runner_->RunMenuAt(GetWidget(), NULL, gfx::Rect(point, gfx::Size()), |
| 337 views::MENU_ANCHOR_TOPLEFT, | 338 views::MENU_ANCHOR_TOPLEFT, |
| 338 source_type) == MenuRunner::MENU_DELETED) { | 339 source_type) == MenuRunner::MENU_DELETED) { |
| 339 return; | 340 return; |
| 340 } | 341 } |
| 341 } | 342 } |
| 342 | 343 |
| 343 } // namespace shell | 344 } // namespace shell |
| 344 } // namespace ash | 345 } // namespace ash |
| OLD | NEW |