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

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

Issue 10409022: Move application lifetime functionality off BrowserList. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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
11 #include <algorithm> 11 #include <algorithm>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/callback.h" 14 #include "base/callback.h"
15 #include "base/i18n/rtl.h" 15 #include "base/i18n/rtl.h"
16 #include "base/string_number_conversions.h" 16 #include "base/string_number_conversions.h"
17 #include "base/threading/thread_restrictions.h" 17 #include "base/threading/thread_restrictions.h"
18 #include "base/utf_string_conversions.h" 18 #include "base/utf_string_conversions.h"
19 #include "base/win/windows_version.h" 19 #include "base/win/windows_version.h"
20 #include "chrome/browser/google/google_util.h" 20 #include "chrome/browser/google/google_util.h"
21 #include "chrome/browser/lifetime/application_lifetime.h"
21 #include "chrome/browser/prefs/pref_service.h" 22 #include "chrome/browser/prefs/pref_service.h"
22 #include "chrome/browser/ui/browser.h" 23 #include "chrome/browser/ui/browser.h"
23 #include "chrome/browser/ui/browser_finder.h" 24 #include "chrome/browser/ui/browser_finder.h"
24 #include "chrome/browser/ui/browser_list.h"
25 #include "chrome/common/chrome_constants.h" 25 #include "chrome/common/chrome_constants.h"
26 #include "chrome/common/chrome_version_info.h" 26 #include "chrome/common/chrome_version_info.h"
27 #include "chrome/common/url_constants.h" 27 #include "chrome/common/url_constants.h"
28 #include "chrome/installer/util/browser_distribution.h" 28 #include "chrome/installer/util/browser_distribution.h"
29 #include "content/public/browser/user_metrics.h" 29 #include "content/public/browser/user_metrics.h"
30 #include "grit/chromium_strings.h" 30 #include "grit/chromium_strings.h"
31 #include "grit/generated_resources.h" 31 #include "grit/generated_resources.h"
32 #include "grit/locale_settings.h" 32 #include "grit/locale_settings.h"
33 #include "grit/theme_resources.h" 33 #include "grit/theme_resources.h"
34 #include "ui/base/l10n/l10n_util.h" 34 #include "ui/base/l10n/l10n_util.h"
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 593
594 bool AboutChromeView::CanMaximize() const { 594 bool AboutChromeView::CanMaximize() const {
595 return false; 595 return false;
596 } 596 }
597 597
598 ui::ModalType AboutChromeView::GetModalType() const { 598 ui::ModalType AboutChromeView::GetModalType() const {
599 return ui::MODAL_TYPE_WINDOW; 599 return ui::MODAL_TYPE_WINDOW;
600 } 600 }
601 601
602 bool AboutChromeView::Accept() { 602 bool AboutChromeView::Accept() {
603 BrowserList::AttemptRestart(); 603 browser::AttemptRestart();
604 return true; 604 return true;
605 } 605 }
606 606
607 views::View* AboutChromeView::GetContentsView() { 607 views::View* AboutChromeView::GetContentsView() {
608 return this; 608 return this;
609 } 609 }
610 610
611 //////////////////////////////////////////////////////////////////////////////// 611 ////////////////////////////////////////////////////////////////////////////////
612 // AboutChromeView, views::LinkListener implementation: 612 // AboutChromeView, views::LinkListener implementation:
613 void AboutChromeView::LinkClicked(views::Link* source, int event_flags) { 613 void AboutChromeView::LinkClicked(views::Link* source, int event_flags) {
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
791 int height = error_label_->GetHeightForWidth( 791 int height = error_label_->GetHeightForWidth(
792 dialog_dimensions_.width() - (2 * views::kPanelHorizMargin)) + 792 dialog_dimensions_.width() - (2 * views::kPanelHorizMargin)) +
793 views::kRelatedControlVerticalSpacing; 793 views::kRelatedControlVerticalSpacing;
794 window_rect.set_height(window_rect.height() + height); 794 window_rect.set_height(window_rect.height() + height);
795 GetWidget()->SetBounds(window_rect); 795 GetWidget()->SetBounds(window_rect);
796 796
797 return height; 797 return height;
798 } 798 }
799 799
800 #endif 800 #endif
OLDNEW
« no previous file with comments | « chrome/browser/ui/tab_modal_confirm_dialog_browsertest.cc ('k') | chrome/browser/ui/views/ash/chrome_shell_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698