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

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

Issue 10698106: Switch about box to web ui on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync'd to ToT. Created 8 years, 5 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/about_chrome_view.h" 5 #include "chrome/browser/ui/views/about_chrome_view.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <commdlg.h> 8 #include <commdlg.h>
9 #endif // defined(OS_WIN) 9 #endif // defined(OS_WIN)
10 10
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 // On-demand updates for Chrome don't work in Vista RTM when UAC is turned 522 // On-demand updates for Chrome don't work in Vista RTM when UAC is turned
523 // off. So, in this case we just want the About box to not mention 523 // off. So, in this case we just want the About box to not mention
524 // on-demand updates. Silent updates (in the background) should still 524 // on-demand updates. Silent updates (in the background) should still
525 // work as before - enabling UAC or installing the latest service pack 525 // work as before - enabling UAC or installing the latest service pack
526 // for Vista is another option. 526 // for Vista is another option.
527 if (!(base::win::GetVersion() == base::win::VERSION_VISTA && 527 if (!(base::win::GetVersion() == base::win::VERSION_VISTA &&
528 (base::win::OSInfo::GetInstance()->service_pack().major == 0) && 528 (base::win::OSInfo::GetInstance()->service_pack().major == 0) &&
529 !base::win::UserAccountControlIsEnabled())) { 529 !base::win::UserAccountControlIsEnabled())) {
530 UpdateStatus(UPGRADE_CHECK_STARTED, GOOGLE_UPDATE_NO_ERROR, string16()); 530 UpdateStatus(UPGRADE_CHECK_STARTED, GOOGLE_UPDATE_NO_ERROR, string16());
531 // CheckForUpdate(false, ...) means don't upgrade yet. 531 // CheckForUpdate(false, ...) means don't upgrade yet.
532 google_updater_->CheckForUpdate(false, GetWidget()); 532 google_updater_->CheckForUpdate(false, GetWidget()->GetNativeWindow());
533 } 533 }
534 #endif 534 #endif
535 } else { 535 } else {
536 parent->RemoveChildView(&update_label_); 536 parent->RemoveChildView(&update_label_);
537 parent->RemoveChildView(throbber_.get()); 537 parent->RemoveChildView(throbber_.get());
538 parent->RemoveChildView(&success_indicator_); 538 parent->RemoveChildView(&success_indicator_);
539 parent->RemoveChildView(&update_available_indicator_); 539 parent->RemoveChildView(&update_available_indicator_);
540 parent->RemoveChildView(&timeout_indicator_); 540 parent->RemoveChildView(&timeout_indicator_);
541 } 541 }
542 } 542 }
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 l10n_util::GetStringUTF16(IDS_UPGRADE_CHECK_STARTED)); 675 l10n_util::GetStringUTF16(IDS_UPGRADE_CHECK_STARTED));
676 break; 676 break;
677 case UPGRADE_IS_AVAILABLE: 677 case UPGRADE_IS_AVAILABLE:
678 content::RecordAction( 678 content::RecordAction(
679 UserMetricsAction("UpgradeCheck_UpgradeIsAvailable")); 679 UserMetricsAction("UpgradeCheck_UpgradeIsAvailable"));
680 DCHECK(!google_updater_); // Should have been nulled out already. 680 DCHECK(!google_updater_); // Should have been nulled out already.
681 google_updater_ = new GoogleUpdate(); 681 google_updater_ = new GoogleUpdate();
682 google_updater_->set_status_listener(this); 682 google_updater_->set_status_listener(this);
683 UpdateStatus(UPGRADE_STARTED, GOOGLE_UPDATE_NO_ERROR, string16()); 683 UpdateStatus(UPGRADE_STARTED, GOOGLE_UPDATE_NO_ERROR, string16());
684 // CheckForUpdate(true,...) means perform upgrade if new version found. 684 // CheckForUpdate(true,...) means perform upgrade if new version found.
685 google_updater_->CheckForUpdate(true, GetWidget()); 685 google_updater_->CheckForUpdate(true, GetWidget()->GetNativeWindow());
686 // TODO(seanparent): Need to see if this code needs to change to 686 // TODO(seanparent): Need to see if this code needs to change to
687 // force a machine restart. 687 // force a machine restart.
688 return; 688 return;
689 case UPGRADE_ALREADY_UP_TO_DATE: { 689 case UPGRADE_ALREADY_UP_TO_DATE: {
690 // The extra version check is necessary on Windows because the application 690 // The extra version check is necessary on Windows because the application
691 // may be already up to date on disk though the running app is still 691 // may be already up to date on disk though the running app is still
692 // out of date. Chrome OS doesn't quite have this issue since the 692 // out of date. Chrome OS doesn't quite have this issue since the
693 // OS/App are updated together. If a newer version of the OS has been 693 // OS/App are updated together. If a newer version of the OS has been
694 // staged then UPGRADE_SUCESSFUL will be returned. 694 // staged then UPGRADE_SUCESSFUL will be returned.
695 // Google Update reported that Chrome is up-to-date. Now make sure that we 695 // Google Update reported that Chrome is up-to-date. Now make sure that we
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 int height = error_label_->GetHeightForWidth( 789 int height = error_label_->GetHeightForWidth(
790 dialog_dimensions_.width() - (2 * views::kPanelHorizMargin)) + 790 dialog_dimensions_.width() - (2 * views::kPanelHorizMargin)) +
791 views::kRelatedControlVerticalSpacing; 791 views::kRelatedControlVerticalSpacing;
792 window_rect.set_height(window_rect.height() + height); 792 window_rect.set_height(window_rect.height() + height);
793 GetWidget()->SetBounds(window_rect); 793 GetWidget()->SetBounds(window_rect);
794 794
795 return height; 795 return height;
796 } 796 }
797 797
798 #endif 798 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698