Don't show supervised user as "already on this device" while they're being imported.
[chromium-blink-merge.git] / chrome / browser / ui / webui / version_handler.h
blobb7f272a90a82c352bc67ad90497b32035f6d2e3e
1 // Copyright (c) 2012 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_VERSION_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_VERSION_HANDLER_H_
8 #include <vector>
10 #include "base/memory/weak_ptr.h"
11 #include "base/values.h"
12 #include "content/public/browser/web_ui_message_handler.h"
13 #include "content/public/common/webplugininfo.h"
15 // Handler class for Version page operations.
16 class VersionHandler : public content::WebUIMessageHandler {
17 public:
18 VersionHandler();
19 ~VersionHandler() override;
21 // content::WebUIMessageHandler implementation.
22 void RegisterMessages() override;
24 // Callback for the "requestVersionInfo" message. This asynchronously requests
25 // the flash version and eventually returns it to the front end along with the
26 // list of variations using OnGotPlugins.
27 virtual void HandleRequestVersionInfo(const base::ListValue* args);
29 private:
30 // Callback which handles returning the executable and profile paths to the
31 // front end.
32 void OnGotFilePaths(base::string16* executable_path_data,
33 base::string16* profile_path_data);
35 // Callback for GetPlugins which responds to the page with the Flash version.
36 // This also initiates the OS Version load on ChromeOS.
37 void OnGotPlugins(const std::vector<content::WebPluginInfo>& plugins);
39 // Factory for the creating refs in callbacks.
40 base::WeakPtrFactory<VersionHandler> weak_ptr_factory_;
42 DISALLOW_COPY_AND_ASSIGN(VersionHandler);
45 #endif // CHROME_BROWSER_UI_WEBUI_VERSION_HANDLER_H_