OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef CHROME_BROWSER_EXTENSIONS_API_SCREENLOCK_PRIVATE_SCREENLOCK_PRIVATE_API_
H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_SCREENLOCK_PRIVATE_SCREENLOCK_PRIVATE_API_
H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_SCREENLOCK_PRIVATE_SCREENLOCK_PRIVATE_API_
H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_SCREENLOCK_PRIVATE_SCREENLOCK_PRIVATE_API_
H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "chrome/browser/extensions/chrome_extension_function.h" | 10 #include "chrome/browser/extensions/chrome_extension_function.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 | 61 |
62 // BrowserContextKeyedAPI | 62 // BrowserContextKeyedAPI |
63 static extensions::BrowserContextKeyedAPIFactory< | 63 static extensions::BrowserContextKeyedAPIFactory< |
64 ScreenlockPrivateEventRouter>* | 64 ScreenlockPrivateEventRouter>* |
65 GetFactoryInstance(); | 65 GetFactoryInstance(); |
66 virtual void Shutdown() OVERRIDE; | 66 virtual void Shutdown() OVERRIDE; |
67 | 67 |
68 // ScreenlockBridge::Observer | 68 // ScreenlockBridge::Observer |
69 virtual void OnScreenDidLock() OVERRIDE; | 69 virtual void OnScreenDidLock() OVERRIDE; |
70 virtual void OnScreenDidUnlock() OVERRIDE; | 70 virtual void OnScreenDidUnlock() OVERRIDE; |
| 71 virtual void OnFocusedUserChanged(const std::string& user_id) OVERRIDE; |
71 | 72 |
72 private: | 73 private: |
73 friend class extensions::BrowserContextKeyedAPIFactory< | 74 friend class extensions::BrowserContextKeyedAPIFactory< |
74 ScreenlockPrivateEventRouter>; | 75 ScreenlockPrivateEventRouter>; |
75 | 76 |
76 // BrowserContextKeyedAPI | 77 // BrowserContextKeyedAPI |
77 static const char* service_name() { | 78 static const char* service_name() { |
78 return "ScreenlockPrivateEventRouter"; | 79 return "ScreenlockPrivateEventRouter"; |
79 } | 80 } |
80 static const bool kServiceIsNULLWhileTesting = true; | 81 static const bool kServiceIsNULLWhileTesting = true; |
81 static const bool kServiceRedirectedInIncognito = true; | 82 static const bool kServiceRedirectedInIncognito = true; |
82 | 83 |
83 void DispatchEvent(const std::string& event_name, base::Value* arg); | 84 void DispatchEvent(const std::string& event_name, base::Value* arg); |
84 | 85 |
85 content::BrowserContext* browser_context_; | 86 content::BrowserContext* browser_context_; |
86 DISALLOW_COPY_AND_ASSIGN(ScreenlockPrivateEventRouter); | 87 DISALLOW_COPY_AND_ASSIGN(ScreenlockPrivateEventRouter); |
87 }; | 88 }; |
88 | 89 |
89 } // namespace extensions | 90 } // namespace extensions |
90 | 91 |
91 #endif // CHROME_BROWSER_EXTENSIONS_API_SCREENLOCK_PRIVATE_SCREENLOCK_PRIVATE_A
PI_H_ | 92 #endif // CHROME_BROWSER_EXTENSIONS_API_SCREENLOCK_PRIVATE_SCREENLOCK_PRIVATE_A
PI_H_ |
OLD | NEW |