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

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

Issue 11571023: Move ash/wm's DialogFrameView to ui/views/window; etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reorder DialogDelegate functions; inline Get*Params into WidgetExample::ButtonPressed; etc. Created 8 years 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 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 #elif defined(OS_POSIX) 365 #elif defined(OS_POSIX)
366 // Create shortcut in Mac dock or as Linux (gnome/kde) application launcher 366 // Create shortcut in Mac dock or as Linux (gnome/kde) application launcher
367 // are not implemented yet. 367 // are not implemented yet.
368 shortcut_info_.create_in_quick_launch_bar = false; 368 shortcut_info_.create_in_quick_launch_bar = false;
369 #endif 369 #endif
370 370
371 web_app::CreateShortcuts(shortcut_info_); 371 web_app::CreateShortcuts(shortcut_info_);
372 return true; 372 return true;
373 } 373 }
374 374
375
376 views::View* CreateApplicationShortcutView::GetContentsView() {
377 return this;
378 }
379
380 views::Checkbox* CreateApplicationShortcutView::AddCheckbox( 375 views::Checkbox* CreateApplicationShortcutView::AddCheckbox(
381 const string16& text, bool checked) { 376 const string16& text, bool checked) {
382 views::Checkbox* checkbox = new views::Checkbox(text); 377 views::Checkbox* checkbox = new views::Checkbox(text);
383 checkbox->SetChecked(checked); 378 checkbox->SetChecked(checked);
384 checkbox->set_listener(this); 379 checkbox->set_listener(this);
385 return checkbox; 380 return checkbox;
386 } 381 }
387 382
388 void CreateApplicationShortcutView::ButtonPressed(views::Button* sender, 383 void CreateApplicationShortcutView::ButtonPressed(views::Button* sender,
389 const ui::Event& event) { 384 const ui::Event& event) {
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 if (image.IsEmpty()) { 529 if (image.IsEmpty()) {
535 shortcut_info_.favicon = ui::ResourceBundle::GetSharedInstance(). 530 shortcut_info_.favicon = ui::ResourceBundle::GetSharedInstance().
536 GetImageNamed(IDR_APP_DEFAULT_ICON); 531 GetImageNamed(IDR_APP_DEFAULT_ICON);
537 } else { 532 } else {
538 shortcut_info_.favicon = image; 533 shortcut_info_.favicon = image;
539 } 534 }
540 535
541 CHECK(app_info_); 536 CHECK(app_info_);
542 static_cast<AppInfoView*>(app_info_)->UpdateIcon(shortcut_info_.favicon); 537 static_cast<AppInfoView*>(app_info_)->UpdateIcon(shortcut_info_.favicon);
543 } 538 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698