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

Side by Side Diff: chrome/browser/ui/views/update_recommended_message_box.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
« no previous file with comments | « chrome/browser/ui/views/frame/browser_frame_win.cc ('k') | chrome/browser/ui/webui/flags_ui.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/update_recommended_message_box.h" 5 #include "chrome/browser/ui/views/update_recommended_message_box.h"
6 6
7 #include "chrome/browser/ui/browser_list.h" 7 #include "chrome/browser/lifetime/application_lifetime.h"
8 #include "grit/chromium_strings.h" 8 #include "grit/chromium_strings.h"
9 #include "grit/generated_resources.h" 9 #include "grit/generated_resources.h"
10 #include "ui/base/l10n/l10n_util.h" 10 #include "ui/base/l10n/l10n_util.h"
11 #include "ui/views/controls/message_box_view.h" 11 #include "ui/views/controls/message_box_view.h"
12 #include "ui/views/widget/widget.h" 12 #include "ui/views/widget/widget.h"
13 13
14 #if defined(OS_CHROMEOS) 14 #if defined(OS_CHROMEOS)
15 #include "chromeos/dbus/dbus_thread_manager.h" 15 #include "chromeos/dbus/dbus_thread_manager.h"
16 #include "chromeos/dbus/power_manager_client.h" 16 #include "chromeos/dbus/power_manager_client.h"
17 #endif 17 #endif
(...skipping 27 matching lines...) Expand all
45 } 45 }
46 46
47 UpdateRecommendedMessageBox::~UpdateRecommendedMessageBox() { 47 UpdateRecommendedMessageBox::~UpdateRecommendedMessageBox() {
48 } 48 }
49 49
50 bool UpdateRecommendedMessageBox::Accept() { 50 bool UpdateRecommendedMessageBox::Accept() {
51 #if defined(OS_CHROMEOS) 51 #if defined(OS_CHROMEOS)
52 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->RequestRestart(); 52 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->RequestRestart();
53 // If running the Chrome OS build, but we're not on the device, fall through 53 // If running the Chrome OS build, but we're not on the device, fall through
54 #endif 54 #endif
55 BrowserList::AttemptRestart(); 55 browser::AttemptRestart();
56 return true; 56 return true;
57 } 57 }
58 58
59 string16 UpdateRecommendedMessageBox::GetDialogButtonLabel( 59 string16 UpdateRecommendedMessageBox::GetDialogButtonLabel(
60 ui::DialogButton button) const { 60 ui::DialogButton button) const {
61 return l10n_util::GetStringUTF16((button == ui::DIALOG_BUTTON_OK) ? 61 return l10n_util::GetStringUTF16((button == ui::DIALOG_BUTTON_OK) ?
62 IDS_RELAUNCH_AND_UPDATE : IDS_NOT_NOW); 62 IDS_RELAUNCH_AND_UPDATE : IDS_NOT_NOW);
63 } 63 }
64 64
65 bool UpdateRecommendedMessageBox::ShouldShowWindowTitle() const { 65 bool UpdateRecommendedMessageBox::ShouldShowWindowTitle() const {
(...skipping 20 matching lines...) Expand all
86 return message_box_view_; 86 return message_box_view_;
87 } 87 }
88 88
89 views::Widget* UpdateRecommendedMessageBox::GetWidget() { 89 views::Widget* UpdateRecommendedMessageBox::GetWidget() {
90 return message_box_view_->GetWidget(); 90 return message_box_view_->GetWidget();
91 } 91 }
92 92
93 const views::Widget* UpdateRecommendedMessageBox::GetWidget() const { 93 const views::Widget* UpdateRecommendedMessageBox::GetWidget() const {
94 return message_box_view_->GetWidget(); 94 return message_box_view_->GetWidget();
95 } 95 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_frame_win.cc ('k') | chrome/browser/ui/webui/flags_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698