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

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 "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 class CopresenceUIHandler final : public content::WebUIMessageHandler,
28 public copresence::CopresenceObserver {
29 public:
30 explicit CopresenceUIHandler(content::WebUI* web_ui);
31 ~CopresenceUIHandler() override;
32
33 private:
34 // WebUIMessageHandler override.
35 void RegisterMessages() override;
36
37 // CopresenceObserver overrides.
38 void DirectivesUpdated() 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 HandlePopulateState(const base::ListValue* args);
44
45 copresence::CopresenceState* state_;
46
47 DISALLOW_COPY_AND_ASSIGN(CopresenceUIHandler);
48 };
49
50 #endif // CHROME_BROWSER_UI_WEBUI_COPRESENCE_UI_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698