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

Unified Diff: chrome/browser/ui/webui/welcome_win10_handler.h

Issue 2449853008: Determine the Win10-specific Welcome page variant to display (Closed)
Patch Set: Created 4 years, 2 months 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/welcome_win10_handler.h
diff --git a/chrome/browser/ui/webui/welcome_win10_handler.h b/chrome/browser/ui/webui/welcome_win10_handler.h
index 990e819de9dbf15529af1c9876514611f4a39e8e..dd717ada0a5c80e23229825d35bba0785b35a10d 100644
--- a/chrome/browser/ui/webui/welcome_win10_handler.h
+++ b/chrome/browser/ui/webui/welcome_win10_handler.h
@@ -5,7 +5,13 @@
#ifndef CHROME_BROWSER_UI_WEBUI_WELCOME_WIN10_HANDLER_H_
#define CHROME_BROWSER_UI_WEBUI_WELCOME_WIN10_HANDLER_H_
+#include <memory>
+#include <string>
+
#include "base/macros.h"
+#include "base/timer/timer.h"
+#include "chrome/common/shell_handler_win.mojom.h"
+#include "content/public/browser/utility_process_mojo_client.h"
#include "content/public/browser/web_ui_message_handler.h"
namespace base {
@@ -22,9 +28,25 @@ class WelcomeWin10Handler : public content::WebUIMessageHandler {
void RegisterMessages() override;
private:
+ // Handlers for javascript calls.
+ void HandleIsPinnedToTaskbar(const base::ListValue* args);
void HandleSetDefaultBrowser(const base::ListValue* args);
void HandleContinue(const base::ListValue* args);
+ // Called when the pinned state is received from the utility process.
tmartino 2016/10/28 15:18:04 The relationship between this method and OnIsPinne
Patrick Monette 2016/10/28 21:21:37 Done.
+ void OnIsPinnedToTaskbarResult(const std::string& callback_id,
+ bool succeeded,
+ bool is_pinned_to_taskbar);
+
+ // Returns the |is_pinned_to_taskbar| state to the calling javascript via
+ // the promise.
+ void OnIsPinnedToTaskbarDetermined(const std::string& callback_id,
+ bool is_pinned_to_taskbar);
+
+ std::unique_ptr<content::UtilityProcessMojoClient<mojom::ShellHandler>>
+ client_;
+ base::OneShotTimer timer_;
+
DISALLOW_COPY_AND_ASSIGN(WelcomeWin10Handler);
};

Powered by Google App Engine
This is Rietveld 408576698