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

Side by Side Diff: chrome/browser/chromeos/locale_change_guard.cc

Issue 11779019: browser: Move FindTabbedBrowser() function into chrome namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 11 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/chromeos/locale_change_guard.h" 5 #include "chrome/browser/chromeos/locale_change_guard.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/system/tray/system_tray.h" 8 #include "ash/system/tray/system_tray.h"
9 #include "ash/system/tray/system_tray_notifier.h" 9 #include "ash/system/tray/system_tray_notifier.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 NOTREACHED(); 77 NOTREACHED();
78 return; 78 return;
79 } 79 }
80 if (reverted_) 80 if (reverted_)
81 return; 81 return;
82 reverted_ = true; 82 reverted_ = true;
83 content::RecordAction(UserMetricsAction("LanguageChange_Revert")); 83 content::RecordAction(UserMetricsAction("LanguageChange_Revert"));
84 profile_->ChangeAppLocale( 84 profile_->ChangeAppLocale(
85 from_locale_, Profile::APP_LOCALE_CHANGED_VIA_REVERT); 85 from_locale_, Profile::APP_LOCALE_CHANGED_VIA_REVERT);
86 86
87 Browser* browser = browser::FindTabbedBrowser(profile_, false, 87 Browser* browser = chrome::FindTabbedBrowser(profile_, false,
88 chrome::HOST_DESKTOP_TYPE_ASH); 88 chrome::HOST_DESKTOP_TYPE_ASH);
89 if (browser) 89 if (browser)
90 chrome::ExecuteCommand(browser, IDC_EXIT); 90 chrome::ExecuteCommand(browser, IDC_EXIT);
91 } 91 }
92 92
93 void LocaleChangeGuard::RevertLocaleChangeCallback(const ListValue* list) { 93 void LocaleChangeGuard::RevertLocaleChangeCallback(const ListValue* list) {
94 RevertLocaleChange(); 94 RevertLocaleChange();
95 } 95 }
96 96
97 void LocaleChangeGuard::Observe(int type, 97 void LocaleChangeGuard::Observe(int type,
98 const content::NotificationSource& source, 98 const content::NotificationSource& source,
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 if (by_user) 227 if (by_user)
228 master_->AcceptLocaleChange(); 228 master_->AcceptLocaleChange();
229 } 229 }
230 230
231 std::string LocaleChangeGuard::Delegate::id() const { 231 std::string LocaleChangeGuard::Delegate::id() const {
232 // Arbitrary unique Id. 232 // Arbitrary unique Id.
233 return "8c386938-1e3f-11e0-ac7b-18a90520e2e5"; 233 return "8c386938-1e3f-11e0-ac7b-18a90520e2e5";
234 } 234 }
235 235
236 } // namespace chromeos 236 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/enrollment_dialog_view.cc ('k') | chrome/browser/chromeos/options/network_config_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698