forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
note_taking_controller.h
49 lines (33 loc) · 1.35 KB
/
note_taking_controller.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef ASH_NOTETAKING_CONTROLLER_H_
#define ASH_NOTETAKING_CONTROLLER_H_
#include "ash/ash_export.h"
#include "ash/public/interfaces/note_taking_controller.mojom.h"
#include "mojo/public/cpp/bindings/binding.h"
namespace ash {
// Controller for the note taking functionality.
class ASH_EXPORT NoteTakingController : public mojom::NoteTakingController {
public:
NoteTakingController();
~NoteTakingController() override;
void BindRequest(mojom::NoteTakingControllerRequest request);
// mojom::NoteTakingController:
void SetClient(mojom::NoteTakingControllerClientPtr client) override;
// Returns true if the client is attached.
bool CanCreateNote() const;
// Calls the method of the same name on |client_|.
void CreateNote();
private:
friend class TestNoteTakingControllerClient;
void OnClientConnectionLost();
void FlushMojoForTesting();
// Binding for mojom::NoteTakingController interface.
mojo::Binding<ash::mojom::NoteTakingController> binding_;
// Interface to NoteTaking controller client (chrome).
mojom::NoteTakingControllerClientPtr client_;
DISALLOW_COPY_AND_ASSIGN(NoteTakingController);
};
} // namespace ash
#endif // ASH_NOTETAKING_CONTROLLER_H_