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

Side by Side Diff: chrome/browser/ui/views/create_application_shortcut_view.cc

Issue 16361009: Do not allow Views new-dialog-style windows to be resized. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make DialogTest.HitTest more flexible. Created 7 years, 6 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 | Annotate | Revision Log
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 "chrome/browser/ui/views/create_application_shortcut_view.h" 5 #include "chrome/browser/ui/views/create_application_shortcut_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 if (button == ui::DIALOG_BUTTON_OK) 347 if (button == ui::DIALOG_BUTTON_OK)
348 return desktop_check_box_->checked() || 348 return desktop_check_box_->checked() ||
349 ((menu_check_box_ != NULL) && 349 ((menu_check_box_ != NULL) &&
350 menu_check_box_->checked()) || 350 menu_check_box_->checked()) ||
351 ((quick_launch_check_box_ != NULL) && 351 ((quick_launch_check_box_ != NULL) &&
352 quick_launch_check_box_->checked()); 352 quick_launch_check_box_->checked());
353 353
354 return true; 354 return true;
355 } 355 }
356 356
357 bool CreateApplicationShortcutView::CanResize() const {
358 return false;
359 }
360
361 bool CreateApplicationShortcutView::CanMaximize() const {
362 return false;
363 }
364
365 ui::ModalType CreateApplicationShortcutView::GetModalType() const { 357 ui::ModalType CreateApplicationShortcutView::GetModalType() const {
366 return ui::MODAL_TYPE_WINDOW; 358 return ui::MODAL_TYPE_WINDOW;
367 } 359 }
368 360
369 string16 CreateApplicationShortcutView::GetWindowTitle() const { 361 string16 CreateApplicationShortcutView::GetWindowTitle() const {
370 return l10n_util::GetStringUTF16(IDS_CREATE_SHORTCUTS_TITLE); 362 return l10n_util::GetStringUTF16(IDS_CREATE_SHORTCUTS_TITLE);
371 } 363 }
372 364
373 bool CreateApplicationShortcutView::Accept() { 365 bool CreateApplicationShortcutView::Accept() {
374 if (!IsDialogButtonEnabled(ui::DIALOG_BUTTON_OK)) 366 if (!IsDialogButtonEnabled(ui::DIALOG_BUTTON_OK))
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 CreateChromeApplicationShortcutView::~CreateChromeApplicationShortcutView() {} 523 CreateChromeApplicationShortcutView::~CreateChromeApplicationShortcutView() {}
532 524
533 // Called when the app's ShortcutInfo (with icon) is loaded. 525 // Called when the app's ShortcutInfo (with icon) is loaded.
534 void CreateChromeApplicationShortcutView::OnShortcutInfoLoaded( 526 void CreateChromeApplicationShortcutView::OnShortcutInfoLoaded(
535 const ShellIntegration::ShortcutInfo& shortcut_info) { 527 const ShellIntegration::ShortcutInfo& shortcut_info) {
536 shortcut_info_ = shortcut_info; 528 shortcut_info_ = shortcut_info;
537 529
538 CHECK(app_info_); 530 CHECK(app_info_);
539 static_cast<AppInfoView*>(app_info_)->UpdateIcon(shortcut_info_.favicon); 531 static_cast<AppInfoView*>(app_info_)->UpdateIcon(shortcut_info_.favicon);
540 } 532 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/create_application_shortcut_view.h ('k') | ui/views/bubble/bubble_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698