OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 "stdafx.h" | 5 #include "stdafx.h" |
6 #include "secondary_tile.h" | 6 #include "secondary_tile.h" |
7 | 7 |
8 #include <windows.ui.startscreen.h> | 8 #include <windows.ui.startscreen.h> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 title.Attach(MakeHString(title_str)); | 140 title.Attach(MakeHString(title_str)); |
141 | 141 |
142 mswrw::HString id; | 142 mswrw::HString id; |
143 id.Attach(MakeHString(tile_id)); | 143 id.Attach(MakeHString(tile_id)); |
144 | 144 |
145 mswrw::HString args; | 145 mswrw::HString args; |
146 // The url is just passed into the tile agruments as is. Metro and desktop | 146 // The url is just passed into the tile agruments as is. Metro and desktop |
147 // chrome will see the arguments as command line parameters. | 147 // chrome will see the arguments as command line parameters. |
148 // A GURL is used to ensure any spaces are properly escaped. | 148 // A GURL is used to ensure any spaces are properly escaped. |
149 GURL url(url_str); | 149 GURL url(url_str); |
150 args.Attach(MakeHString(UTF8ToUTF16(url.spec()))); | 150 args.Attach(MakeHString(base::UTF8ToUTF16(url.spec()))); |
151 | 151 |
152 mswr::ComPtr<winfoundtn::IUriRuntimeClassFactory> uri_factory; | 152 mswr::ComPtr<winfoundtn::IUriRuntimeClassFactory> uri_factory; |
153 hr = winrt_utils::CreateActivationFactory( | 153 hr = winrt_utils::CreateActivationFactory( |
154 RuntimeClass_Windows_Foundation_Uri, | 154 RuntimeClass_Windows_Foundation_Uri, |
155 uri_factory.GetAddressOf()); | 155 uri_factory.GetAddressOf()); |
156 CheckHR(hr, "Failed to create URIFactory"); | 156 CheckHR(hr, "Failed to create URIFactory"); |
157 | 157 |
158 mswrw::HString logo_url; | 158 mswrw::HString logo_url; |
159 logo_url.Attach( | 159 logo_url.Attach( |
160 MakeHString(base::string16(L"file:///").append(logo_path.value()))); | 160 MakeHString(base::string16(L"file:///").append(logo_path.value()))); |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 const base::FilePath& logo_path, | 220 const base::FilePath& logo_path, |
221 const MetroPinUmaResultCallback& callback) { | 221 const MetroPinUmaResultCallback& callback) { |
222 globals.appview_msg_loop->PostTask( | 222 globals.appview_msg_loop->PostTask( |
223 FROM_HERE, base::Bind(&CreateTileOnStartScreen, | 223 FROM_HERE, base::Bind(&CreateTileOnStartScreen, |
224 tile_id, | 224 tile_id, |
225 title, | 225 title, |
226 url, | 226 url, |
227 logo_path, | 227 logo_path, |
228 callback)); | 228 callback)); |
229 } | 229 } |
OLD | NEW |