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

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 "base/macros.h"
9 #include "components/copresence/public/copresence_observer.h"
10 #include "content/public/browser/web_ui_message_handler.h"
11
12 namespace base {
13 class ListValue;
14 }
15
16 namespace content {
17 class WebUI;
18 }
19
20 namespace copresence {
21 class CopresenceState;
22 }
23
24 // UI Handler for the copresence page.
25 // TODO(crbug.com/444263): Write tests.
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 DirectivesUpdated() override;
38 void TokenTransmitted(const copresence::TransmittedToken& token) override;
39 void TokenReceived(const copresence::ReceivedToken& token) override;
40
41 // Handler to populate the page with its initial state.
42 void HandlePopulateState(const base::ListValue* args);
43
44 copresence::CopresenceState* state_;
45
46 DISALLOW_COPY_AND_ASSIGN(CopresenceUIHandler);
47 };
48
49 #endif // CHROME_BROWSER_UI_WEBUI_COPRESENCE_UI_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/copresence_ui.cc ('k') | chrome/browser/ui/webui/copresence_ui_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698