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

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

Issue 2479773002: Add chrome namespace to chrome/common/shell_handler_win.mojom (Closed)
Patch Set: Add chrome namespace to chrome/common/shell_handler_win.mojom Created 4 years, 1 month 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 | « chrome/browser/ui/webui/welcome_win10_handler.h ('k') | chrome/common/shell_handler_win.mojom » ('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 #include "chrome/browser/ui/webui/welcome_win10_handler.h" 5 #include "chrome/browser/ui/webui/welcome_win10_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "chrome/browser/shell_integration.h" 9 #include "chrome/browser/shell_integration.h"
10 #include "chrome/common/url_constants.h" 10 #include "chrome/common/url_constants.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 } 69 }
70 70
71 void WelcomeWin10Handler::HandleContinue(const base::ListValue* args) { 71 void WelcomeWin10Handler::HandleContinue(const base::ListValue* args) {
72 web_ui()->GetWebContents()->GetController().LoadURL( 72 web_ui()->GetWebContents()->GetController().LoadURL(
73 GURL(chrome::kChromeUINewTabURL), content::Referrer(), 73 GURL(chrome::kChromeUINewTabURL), content::Referrer(),
74 ui::PageTransition::PAGE_TRANSITION_LINK, std::string()); 74 ui::PageTransition::PAGE_TRANSITION_LINK, std::string());
75 } 75 }
76 76
77 void WelcomeWin10Handler::StartIsPinnedToTaskbarCheck() { 77 void WelcomeWin10Handler::StartIsPinnedToTaskbarCheck() {
78 // Start the utility process that will handle the IsPinnedToTaskbar() call. 78 // Start the utility process that will handle the IsPinnedToTaskbar() call.
79 client_ = 79 client_ = base::MakeUnique<
80 base::MakeUnique<content::UtilityProcessMojoClient<mojom::ShellHandler>>( 80 content::UtilityProcessMojoClient<chrome::mojom::ShellHandler>>(
81 l10n_util::GetStringUTF16(IDS_UTILITY_PROCESS_SHELL_HANDLER_NAME)); 81 l10n_util::GetStringUTF16(IDS_UTILITY_PROCESS_SHELL_HANDLER_NAME));
82 82
83 // Assume that Chrome is pinned to the taskbar if an error occurs. 83 // Assume that Chrome is pinned to the taskbar if an error occurs.
84 client_->set_error_callback( 84 client_->set_error_callback(
85 base::Bind(&WelcomeWin10Handler::OnIsPinnedToTaskbarDetermined, 85 base::Bind(&WelcomeWin10Handler::OnIsPinnedToTaskbarDetermined,
86 base::Unretained(this), true)); 86 base::Unretained(this), true));
87 client_->set_disable_sandbox(); 87 client_->set_disable_sandbox();
88 client_->Start(); 88 client_->Start();
89 89
90 client_->service()->IsPinnedToTaskbar(base::Bind( 90 client_->service()->IsPinnedToTaskbar(base::Bind(
91 &WelcomeWin10Handler::OnIsPinnedToTaskbarResult, base::Unretained(this))); 91 &WelcomeWin10Handler::OnIsPinnedToTaskbarResult, base::Unretained(this)));
(...skipping 19 matching lines...) Expand all
111 // sent back. 111 // sent back.
112 if (!pinned_state_callback_id_.empty()) 112 if (!pinned_state_callback_id_.empty())
113 SendPinnedToTaskbarStateResult(); 113 SendPinnedToTaskbarStateResult();
114 } 114 }
115 115
116 void WelcomeWin10Handler::SendPinnedToTaskbarStateResult() { 116 void WelcomeWin10Handler::SendPinnedToTaskbarStateResult() {
117 ResolveJavascriptCallback( 117 ResolveJavascriptCallback(
118 base::StringValue(pinned_state_callback_id_), 118 base::StringValue(pinned_state_callback_id_),
119 base::FundamentalValue(pinned_state_result_.value())); 119 base::FundamentalValue(pinned_state_result_.value()));
120 } 120 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/welcome_win10_handler.h ('k') | chrome/common/shell_handler_win.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698