| OLD | NEW |
| 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/ash_switches.h" | 7 #include "ash/ash_switches.h" |
| 8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
| 9 #include "ash/system/tray/system_tray.h" | 9 #include "ash/system/tray/system_tray.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 #include "ui/base/l10n/l10n_util.h" | 29 #include "ui/base/l10n/l10n_util.h" |
| 30 | 30 |
| 31 using content::UserMetricsAction; | 31 using content::UserMetricsAction; |
| 32 using content::WebContents; | 32 using content::WebContents; |
| 33 | 33 |
| 34 namespace chromeos { | 34 namespace chromeos { |
| 35 | 35 |
| 36 class LocaleChangeGuard::Delegate : public NotificationDelegate { | 36 class LocaleChangeGuard::Delegate : public NotificationDelegate { |
| 37 public: | 37 public: |
| 38 explicit Delegate(chromeos::LocaleChangeGuard* master) : master_(master) {} | 38 explicit Delegate(chromeos::LocaleChangeGuard* master) : master_(master) {} |
| 39 void Close(bool by_user); | 39 virtual void Close(bool by_user) OVERRIDE; |
| 40 void Display() {} | 40 virtual void Display() OVERRIDE {} |
| 41 void Error() {} | 41 virtual void Error() OVERRIDE {} |
| 42 void Click() {} | 42 virtual void Click() OVERRIDE {} |
| 43 std::string id() const; | 43 virtual std::string id() const OVERRIDE; |
| 44 virtual content::RenderViewHost* GetRenderViewHost() const OVERRIDE { |
| 45 return NULL; |
| 46 } |
| 44 | 47 |
| 45 private: | 48 private: |
| 46 chromeos::LocaleChangeGuard* master_; | 49 chromeos::LocaleChangeGuard* master_; |
| 47 | 50 |
| 48 DISALLOW_COPY_AND_ASSIGN(Delegate); | 51 DISALLOW_COPY_AND_ASSIGN(Delegate); |
| 49 }; | 52 }; |
| 50 | 53 |
| 51 LocaleChangeGuard::LocaleChangeGuard(Profile* profile) | 54 LocaleChangeGuard::LocaleChangeGuard(Profile* profile) |
| 52 : profile_(profile), | 55 : profile_(profile), |
| 53 note_(NULL), | 56 note_(NULL), |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 if (by_user) | 243 if (by_user) |
| 241 master_->AcceptLocaleChange(); | 244 master_->AcceptLocaleChange(); |
| 242 } | 245 } |
| 243 | 246 |
| 244 std::string LocaleChangeGuard::Delegate::id() const { | 247 std::string LocaleChangeGuard::Delegate::id() const { |
| 245 // Arbitrary unique Id. | 248 // Arbitrary unique Id. |
| 246 return "8c386938-1e3f-11e0-ac7b-18a90520e2e5"; | 249 return "8c386938-1e3f-11e0-ac7b-18a90520e2e5"; |
| 247 } | 250 } |
| 248 | 251 |
| 249 } // namespace chromeos | 252 } // namespace chromeos |
| OLD | NEW |