Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(167)

Side by Side Diff: ash/shell/window_type_launcher.cc

Issue 583603004: Add CanMinimize to classes that implement WidgetDelegate::CanMaximize. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@win_resizable
Patch Set: Add TODO. Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/shell/window_type_launcher.h ('k') | ash/wm/resize_shadow_and_cursor_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ash/shell/window_type_launcher.h ('k') | ash/wm/resize_shadow_and_cursor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698