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

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

Issue 2633743002: Add GetIsPinnedToTaskbarState() (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « chrome/browser/shell_integration_win.cc ('k') | chrome/browser/ui/webui/welcome_win10_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 aafbf863d00fe749fcf6c292dc780d884b724537..440eb75641ce1bb603bb2ab35997ed0dac3e8587 100644
--- a/chrome/browser/ui/webui/welcome_win10_handler.h
+++ b/chrome/browser/ui/webui/welcome_win10_handler.h
@@ -5,14 +5,12 @@
#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/memory/weak_ptr.h"
#include "base/optional.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 {
@@ -36,7 +34,7 @@ class WelcomeWin10Handler : public content::WebUIMessageHandler {
void StartIsPinnedToTaskbarCheck();
- // Callback for mojom::ShellHandler's call to IsPinnedToTaskbar().
+ // Callback for shell_integration::win::GetIsPinnedToTaskbarState().
void OnIsPinnedToTaskbarResult(bool succeeded, bool is_pinned_to_taskbar);
// Sets the internal result and optionally call
@@ -48,8 +46,6 @@ class WelcomeWin10Handler : public content::WebUIMessageHandler {
// promise.
void SendPinnedToTaskbarStateResult();
- std::unique_ptr<content::UtilityProcessMojoClient<mojom::ShellHandler>>
- client_;
base::OneShotTimer timer_;
// Acts as a cache to hold the taskbar pinned state of Chrome. It has no value
@@ -62,6 +58,8 @@ class WelcomeWin10Handler : public content::WebUIMessageHandler {
// when it is received, or wait for the call to happen.
std::string pinned_state_callback_id_;
+ base::WeakPtrFactory<WelcomeWin10Handler> weak_ptr_factory_;
+
DISALLOW_COPY_AND_ASSIGN(WelcomeWin10Handler);
};
« no previous file with comments | « chrome/browser/shell_integration_win.cc ('k') | chrome/browser/ui/webui/welcome_win10_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698