Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_UI_WEBUI_COPRESENCE_UI_HANDLER_H_ | |
| 6 #define CHROME_BROWSER_UI_WEBUI_COPRESENCE_UI_HANDLER_H_ | |
| 7 | |
| 8 #include <vector> | |
|
Dan Beam
2014/12/09 05:33:39
unused?
Charlie
2014/12/17 23:39:56
Yep. Nixed.
| |
| 9 | |
| 10 #include "base/macros.h" | |
| 11 #include "components/copresence/public/copresence_observer.h" | |
| 12 #include "content/public/browser/web_ui_message_handler.h" | |
| 13 | |
| 14 namespace base { | |
| 15 class ListValue; | |
| 16 } | |
| 17 | |
| 18 namespace content { | |
| 19 class WebUI; | |
| 20 } | |
| 21 | |
| 22 namespace copresence { | |
| 23 class CopresenceState; | |
| 24 } | |
| 25 | |
| 26 // UI Handler for the copresence page. | |
| 27 // TODO(ckehoe): Write tests. | |
|
Dan Beam
2014/12/09 05:33:39
why not just write the tests?
Charlie
2014/12/17 23:39:56
Haha. You haven't worked with my manager :-)
This
Dan Beam
2014/12/20 00:10:29
i'd just do this todo or remove it as it's a waste
Charlie
2014/12/20 02:04:51
Not only do I plan to do it, but I can tell you th
| |
| 28 class CopresenceUIHandler final : public content::WebUIMessageHandler, | |
| 29 public copresence::CopresenceObserver { | |
| 30 public: | |
| 31 explicit CopresenceUIHandler(content::WebUI* web_ui); | |
| 32 ~CopresenceUIHandler() override; | |
| 33 | |
| 34 private: | |
| 35 // WebUIMessageHandler override. | |
| 36 void RegisterMessages() override; | |
| 37 | |
| 38 // CopresenceObserver overrides. | |
| 39 void DirectivesUpdated() override; | |
| 40 void TokenSent(const copresence::SentToken& token) override; | |
| 41 void TokenReceived(const copresence::ReceivedToken& token) override; | |
| 42 | |
| 43 // Handler to populate the page with its initial state. | |
| 44 void HandlePopulateState(const base::ListValue* args); | |
| 45 | |
| 46 copresence::CopresenceState* state_; | |
| 47 | |
| 48 DISALLOW_COPY_AND_ASSIGN(CopresenceUIHandler); | |
| 49 }; | |
| 50 | |
| 51 #endif // CHROME_BROWSER_UI_WEBUI_COPRESENCE_UI_HANDLER_H_ | |
| OLD | NEW |