Don't show supervised user as "already on this device" while they're being imported.
[chromium-blink-merge.git] / chrome / browser / ui / webui / media_router / media_router_webui_message_handler.h
blob2ad161fec14240e36e07e2a903ca3a2ee404bbb8
1 // Copyright 2015 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.
5 #ifndef CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_ROUTER_WEBUI_MESSAGE_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_ROUTER_WEBUI_MESSAGE_HANDLER_H_
8 #include "base/macros.h"
9 #include "content/public/browser/web_ui_message_handler.h"
11 namespace base {
12 class ListValue;
13 } // namespace base
15 namespace media_router {
17 class MediaRouterUI;
19 // The handler for Javascript messages related to the media router dialog.
20 class MediaRouterWebUIMessageHandler : public content::WebUIMessageHandler {
21 public:
22 MediaRouterWebUIMessageHandler();
23 ~MediaRouterWebUIMessageHandler() override;
25 // WebUIMessageHandler implementation.
26 void RegisterMessages() override;
28 private:
29 // Handlers for JavaScript messages.
30 void OnGetInitialSettings(const base::ListValue* args);
31 void OnCreateRoute(const base::ListValue* args);
32 void OnActOnIssue(const base::ListValue* args);
33 void OnCloseRoute(const base::ListValue* args);
34 void OnCloseDialog(const base::ListValue* args);
36 // Helper function for getting a pointer to the corresponding MediaRouterUI.
37 MediaRouterUI* GetMediaRouterUI() const;
39 // Keeps track of whether a command to close the dialog has been issued.
40 bool dialog_closing_;
42 DISALLOW_COPY_AND_ASSIGN(MediaRouterWebUIMessageHandler);
45 } // namespace media_router
47 #endif // CHROME_BROWSER_UI_WEBUI_MEDIA_ROUTER_MEDIA_ROUTER_WEBUI_MESSAGE_HANDLER_H_