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

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

Issue 10827271: Replace views::Event with ui::Event. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 392
393 views::Checkbox* CreateApplicationShortcutView::AddCheckbox( 393 views::Checkbox* CreateApplicationShortcutView::AddCheckbox(
394 const string16& text, bool checked) { 394 const string16& text, bool checked) {
395 views::Checkbox* checkbox = new views::Checkbox(text); 395 views::Checkbox* checkbox = new views::Checkbox(text);
396 checkbox->SetChecked(checked); 396 checkbox->SetChecked(checked);
397 checkbox->set_listener(this); 397 checkbox->set_listener(this);
398 return checkbox; 398 return checkbox;
399 } 399 }
400 400
401 void CreateApplicationShortcutView::ButtonPressed(views::Button* sender, 401 void CreateApplicationShortcutView::ButtonPressed(views::Button* sender,
402 const views::Event& event) { 402 const ui::Event& event) {
403 if (sender == desktop_check_box_) 403 if (sender == desktop_check_box_)
404 profile_->GetPrefs()->SetBoolean(prefs::kWebAppCreateOnDesktop, 404 profile_->GetPrefs()->SetBoolean(prefs::kWebAppCreateOnDesktop,
405 desktop_check_box_->checked() ? true : false); 405 desktop_check_box_->checked() ? true : false);
406 else if (sender == menu_check_box_) 406 else if (sender == menu_check_box_)
407 profile_->GetPrefs()->SetBoolean(prefs::kWebAppCreateInAppsMenu, 407 profile_->GetPrefs()->SetBoolean(prefs::kWebAppCreateInAppsMenu,
408 menu_check_box_->checked() ? true : false); 408 menu_check_box_->checked() ? true : false);
409 else if (sender == quick_launch_check_box_) 409 else if (sender == quick_launch_check_box_)
410 profile_->GetPrefs()->SetBoolean(prefs::kWebAppCreateInQuickLaunchBar, 410 profile_->GetPrefs()->SetBoolean(prefs::kWebAppCreateInQuickLaunchBar,
411 quick_launch_check_box_->checked() ? true : false); 411 quick_launch_check_box_->checked() ? true : false);
412 412
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 if (image.IsEmpty()) { 538 if (image.IsEmpty()) {
539 shortcut_info_.favicon = ui::ResourceBundle::GetSharedInstance(). 539 shortcut_info_.favicon = ui::ResourceBundle::GetSharedInstance().
540 GetImageNamed(IDR_APP_DEFAULT_ICON); 540 GetImageNamed(IDR_APP_DEFAULT_ICON);
541 } else { 541 } else {
542 shortcut_info_.favicon = image; 542 shortcut_info_.favicon = image;
543 } 543 }
544 544
545 CHECK(app_info_); 545 CHECK(app_info_);
546 static_cast<AppInfoView*>(app_info_)->UpdateIcon(shortcut_info_.favicon); 546 static_cast<AppInfoView*>(app_info_)->UpdateIcon(shortcut_info_.favicon);
547 } 547 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698