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

Side by Side Diff: chrome/browser/ui/webui/welcome_win10_handler.h

Issue 2513953004: Adding metrics on the usefulness of the Win10 version of the Welcome Page (Closed)
Patch Set: merge Created 4 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/webui/welcome_win10_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_WEBUI_WELCOME_WIN10_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_WELCOME_WIN10_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_WELCOME_WIN10_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_WELCOME_WIN10_HANDLER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
12 #include "base/optional.h" 12 #include "base/optional.h"
13 #include "base/timer/timer.h" 13 #include "base/timer/timer.h"
14 #include "content/public/browser/web_ui_message_handler.h" 14 #include "content/public/browser/web_ui_message_handler.h"
15 15
16 namespace base { 16 namespace base {
17 class ListValue; 17 class ListValue;
18 } 18 }
19 19
20 // Handles actions on the Windows 10 specific Welcome page. 20 // Handles actions on the Windows 10 specific Welcome page.
21 class WelcomeWin10Handler : public content::WebUIMessageHandler { 21 class WelcomeWin10Handler : public content::WebUIMessageHandler {
22 public: 22 public:
23 WelcomeWin10Handler(); 23 explicit WelcomeWin10Handler(bool inline_style_variant);
24 ~WelcomeWin10Handler() override; 24 ~WelcomeWin10Handler() override;
25 25
26 // content::WebUIMessageHandler: 26 // content::WebUIMessageHandler:
27 void RegisterMessages() override; 27 void RegisterMessages() override;
28 28
29 private: 29 private:
30 // Handlers for javascript calls. 30 // Handlers for javascript calls.
31 void HandleGetPinnedToTaskbarState(const base::ListValue* args); 31 void HandleGetPinnedToTaskbarState(const base::ListValue* args);
32 void HandleSetDefaultBrowser(const base::ListValue* args); 32 void HandleSetDefaultBrowser(const base::ListValue* args);
33 void HandleContinue(const base::ListValue* args); 33 void HandleContinue(const base::ListValue* args);
(...skipping 17 matching lines...) Expand all
51 // Acts as a cache to hold the taskbar pinned state of Chrome. It has no value 51 // Acts as a cache to hold the taskbar pinned state of Chrome. It has no value
52 // until this state is determined. 52 // until this state is determined.
53 base::Optional<bool> pinned_state_result_; 53 base::Optional<bool> pinned_state_result_;
54 54
55 // The callback id used to return the result to the getPinnedToTaskbarState() 55 // The callback id used to return the result to the getPinnedToTaskbarState()
56 // javascript call. This id is empty until we receive the call; thus this 56 // javascript call. This id is empty until we receive the call; thus this
57 // variable is used to determine if the result should be sent to the caller 57 // variable is used to determine if the result should be sent to the caller
58 // when it is received, or wait for the call to happen. 58 // when it is received, or wait for the call to happen.
59 std::string pinned_state_callback_id_; 59 std::string pinned_state_callback_id_;
60 60
61 // Indicates if the inline style variant is displayed.
62 bool inline_style_variant_;
63
61 base::WeakPtrFactory<WelcomeWin10Handler> weak_ptr_factory_; 64 base::WeakPtrFactory<WelcomeWin10Handler> weak_ptr_factory_;
62 65
63 DISALLOW_COPY_AND_ASSIGN(WelcomeWin10Handler); 66 DISALLOW_COPY_AND_ASSIGN(WelcomeWin10Handler);
64 }; 67 };
65 68
66 #endif // CHROME_BROWSER_UI_WEBUI_WELCOME_WIN10_HANDLER_H_ 69 #endif // CHROME_BROWSER_UI_WEBUI_WELCOME_WIN10_HANDLER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/webui/welcome_win10_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698