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

Side by Side Diff: chrome/browser/ui/webui/copresence_ui_handler.h

Issue 734243003: Adding the chrome://copresence page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@state
Patch Set: Created 6 years 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
OLDNEW
(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>
9
10 #include "components/copresence/public/copresence_observer.h"
11 #include "content/public/browser/web_ui_message_handler.h"
12
13 namespace base {
14 class ListValue;
15 }
16
17 namespace content {
18 class WebUI;
19 }
20
21 namespace copresence {
22 class CopresenceState;
23 }
24
25 // UI Handler for the copresence page.
26 class CopresenceUIHandler final : public content::WebUIMessageHandler,
27 public copresence::CopresenceObserver {
28 public:
29 explicit CopresenceUIHandler(content::WebUI* web_ui);
30 ~CopresenceUIHandler() override;
31
32 private:
33 // WebUIMessageHandler override.
34 void RegisterMessages() override;
35
36 // CopresenceObserver overrides.
37 void UpdateDirectives(
38 const std::vector<copresence::Directive>& active_directives) override;
39 void TokenSent(const copresence::SentToken& token) override;
40 void TokenReceived(const copresence::ReceivedToken& token) override;
41
42 // Handler to populate the page with its initial state.
43 void PopulateState(const base::ListValue* args);
xiyuan 2014/12/05 18:56:56 nit: PopulateState -> HandlePopulateState as in mo
Charlie 2014/12/05 21:26:09 Done.
44
45 copresence::CopresenceState* state_;
46
47 DISALLOW_COPY_AND_ASSIGN(CopresenceUIHandler);
xiyuan 2014/12/05 18:56:56 nit: #include "base/macros.h"
Charlie 2014/12/05 21:26:08 Done.
48 };
49
50 #endif // CHROME_BROWSER_UI_WEBUI_COPRESENCE_UI_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698