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 27 matching lines...) Expand all Loading... |
38 explicit Delegate(chromeos::LocaleChangeGuard* master) : master_(master) {} | 38 explicit Delegate(chromeos::LocaleChangeGuard* master) : master_(master) {} |
39 virtual void Close(bool by_user) OVERRIDE; | 39 virtual void Close(bool by_user) OVERRIDE; |
40 virtual void Display() OVERRIDE {} | 40 virtual void Display() OVERRIDE {} |
41 virtual void Error() OVERRIDE {} | 41 virtual void Error() OVERRIDE {} |
42 virtual void Click() OVERRIDE {} | 42 virtual void Click() OVERRIDE {} |
43 virtual std::string id() const OVERRIDE; | 43 virtual std::string id() const OVERRIDE; |
44 virtual content::RenderViewHost* GetRenderViewHost() const OVERRIDE { | 44 virtual content::RenderViewHost* GetRenderViewHost() const OVERRIDE { |
45 return NULL; | 45 return NULL; |
46 } | 46 } |
47 | 47 |
| 48 protected: |
| 49 virtual ~Delegate() {} |
| 50 |
48 private: | 51 private: |
49 chromeos::LocaleChangeGuard* master_; | 52 chromeos::LocaleChangeGuard* master_; |
50 | 53 |
51 DISALLOW_COPY_AND_ASSIGN(Delegate); | 54 DISALLOW_COPY_AND_ASSIGN(Delegate); |
52 }; | 55 }; |
53 | 56 |
54 LocaleChangeGuard::LocaleChangeGuard(Profile* profile) | 57 LocaleChangeGuard::LocaleChangeGuard(Profile* profile) |
55 : profile_(profile), | 58 : profile_(profile), |
56 note_(NULL), | 59 note_(NULL), |
57 reverted_(false) { | 60 reverted_(false) { |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 if (by_user) | 247 if (by_user) |
245 master_->AcceptLocaleChange(); | 248 master_->AcceptLocaleChange(); |
246 } | 249 } |
247 | 250 |
248 std::string LocaleChangeGuard::Delegate::id() const { | 251 std::string LocaleChangeGuard::Delegate::id() const { |
249 // Arbitrary unique Id. | 252 // Arbitrary unique Id. |
250 return "8c386938-1e3f-11e0-ac7b-18a90520e2e5"; | 253 return "8c386938-1e3f-11e0-ac7b-18a90520e2e5"; |
251 } | 254 } |
252 | 255 |
253 } // namespace chromeos | 256 } // namespace chromeos |
OLD | NEW |