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

Side by Side Diff: chrome/browser/ui/views/create_application_shortcut_view.cc

Issue 666533007: Move JavaScriptDialogManager, JavascriptAppModalDialogViews to components/app_modal_dialogs (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 6 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
OLDNEW
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 "chrome/browser/ui/views/create_application_shortcut_view.h" 5 #include "chrome/browser/ui/views/create_application_shortcut_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 canvas->sk_canvas()->drawRoundRect(inner_rect, SkDoubleToScalar(1.5), 222 canvas->sk_canvas()->drawRoundRect(inner_rect, SkDoubleToScalar(1.5),
223 SkDoubleToScalar(1.5), inner_paint); 223 SkDoubleToScalar(1.5), inner_paint);
224 } 224 }
225 225
226 } // namespace 226 } // namespace
227 227
228 namespace chrome { 228 namespace chrome {
229 229
230 void ShowCreateWebAppShortcutsDialog(gfx::NativeWindow parent_window, 230 void ShowCreateWebAppShortcutsDialog(gfx::NativeWindow parent_window,
231 content::WebContents* web_contents) { 231 content::WebContents* web_contents) {
232 CreateBrowserModalDialogViews( 232 CreateWindowModalDialogViews(
233 new CreateUrlApplicationShortcutView(web_contents), 233 new CreateUrlApplicationShortcutView(web_contents),
234 parent_window)->Show(); 234 parent_window)->Show();
235 } 235 }
236 236
237 void ShowCreateChromeAppShortcutsDialog( 237 void ShowCreateChromeAppShortcutsDialog(
238 gfx::NativeWindow parent_window, 238 gfx::NativeWindow parent_window,
239 Profile* profile, 239 Profile* profile,
240 const extensions::Extension* app, 240 const extensions::Extension* app,
241 const base::Callback<void(bool)>& close_callback) { 241 const base::Callback<void(bool)>& close_callback) {
242 CreateBrowserModalDialogViews( 242 CreateWindowModalDialogViews(
243 new CreateChromeApplicationShortcutView(profile, app, close_callback), 243 new CreateChromeApplicationShortcutView(profile, app, close_callback),
244 parent_window)->Show(); 244 parent_window)->Show();
245 } 245 }
246 246
247 } // namespace chrome 247 } // namespace chrome
248 248
249 CreateApplicationShortcutView::CreateApplicationShortcutView(Profile* profile) 249 CreateApplicationShortcutView::CreateApplicationShortcutView(Profile* profile)
250 : profile_(profile), 250 : profile_(profile),
251 app_info_(NULL), 251 app_info_(NULL),
252 create_shortcuts_label_(NULL), 252 create_shortcuts_label_(NULL),
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 close_callback_.Run(false); 539 close_callback_.Run(false);
540 return CreateApplicationShortcutView::Cancel(); 540 return CreateApplicationShortcutView::Cancel();
541 } 541 }
542 542
543 void CreateChromeApplicationShortcutView::OnAppInfoLoaded( 543 void CreateChromeApplicationShortcutView::OnAppInfoLoaded(
544 const web_app::ShortcutInfo& shortcut_info, 544 const web_app::ShortcutInfo& shortcut_info,
545 const extensions::FileHandlersInfo& file_handlers_info) { 545 const extensions::FileHandlersInfo& file_handlers_info) {
546 shortcut_info_ = shortcut_info; 546 shortcut_info_ = shortcut_info;
547 file_handlers_info_ = file_handlers_info; 547 file_handlers_info_ = file_handlers_info;
548 } 548 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698