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/root_window_controller.h" | 7 #include "ash/root_window_controller.h" |
8 #include "ash/screensaver/screensaver_view.h" | 8 #include "ash/screensaver/screensaver_view.h" |
9 #include "ash/session/session_state_delegate.h" | 9 #include "ash/session/session_state_delegate.h" |
10 #include "ash/shelf/shelf_widget.h" | 10 #include "ash/shelf/shelf_widget.h" |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 } | 292 } |
293 | 293 |
294 base::string16 WindowTypeLauncher::GetWindowTitle() const { | 294 base::string16 WindowTypeLauncher::GetWindowTitle() const { |
295 return base::ASCIIToUTF16("Examples: Window Builder"); | 295 return base::ASCIIToUTF16("Examples: Window Builder"); |
296 } | 296 } |
297 | 297 |
298 bool WindowTypeLauncher::CanMaximize() const { | 298 bool WindowTypeLauncher::CanMaximize() const { |
299 return true; | 299 return true; |
300 } | 300 } |
301 | 301 |
| 302 bool WindowTypeLauncher::CanMinimize() const { |
| 303 return true; |
| 304 } |
| 305 |
302 void WindowTypeLauncher::ButtonPressed(views::Button* sender, | 306 void WindowTypeLauncher::ButtonPressed(views::Button* sender, |
303 const ui::Event& event) { | 307 const ui::Event& event) { |
304 if (sender == create_button_) { | 308 if (sender == create_button_) { |
305 ToplevelWindow::CreateParams params; | 309 ToplevelWindow::CreateParams params; |
306 params.can_resize = true; | 310 params.can_resize = true; |
307 params.can_maximize = true; | 311 params.can_maximize = true; |
308 ToplevelWindow::CreateToplevelWindow(params); | 312 ToplevelWindow::CreateToplevelWindow(params); |
309 } else if (sender == panel_button_) { | 313 } else if (sender == panel_button_) { |
310 PanelWindow::CreatePanelWindow(gfx::Rect()); | 314 PanelWindow::CreatePanelWindow(gfx::Rect()); |
311 } else if (sender == create_nonresizable_button_) { | 315 } else if (sender == create_nonresizable_button_) { |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 NULL, | 396 NULL, |
393 gfx::Rect(point, gfx::Size()), | 397 gfx::Rect(point, gfx::Size()), |
394 views::MENU_ANCHOR_TOPLEFT, | 398 views::MENU_ANCHOR_TOPLEFT, |
395 source_type) == MenuRunner::MENU_DELETED) { | 399 source_type) == MenuRunner::MENU_DELETED) { |
396 return; | 400 return; |
397 } | 401 } |
398 } | 402 } |
399 | 403 |
400 } // namespace shell | 404 } // namespace shell |
401 } // namespace ash | 405 } // namespace ash |
OLD | NEW |