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

Side by Side Diff: chrome/browser/ui/cocoa/browser_dialogs_views_mac.cc

Issue 2929733003: MacViews: Wire up CreateChromeApplicationShortcutView
Patch Set: rename ivar Created 3 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/cocoa/browser_dialogs_views_mac.h"
6
5 #include <utility> 7 #include <utility>
6 8
7 #include "chrome/browser/ui/bookmarks/bookmark_bubble_sign_in_delegate.h" 9 #include "chrome/browser/ui/bookmarks/bookmark_bubble_sign_in_delegate.h"
8 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
9 #include "chrome/browser/ui/browser_dialogs.h" 11 #include "chrome/browser/ui/browser_dialogs.h"
10 #include "chrome/browser/ui/cocoa/browser_dialogs_views_mac.h" 12 #include "chrome/browser/ui/cocoa/browser_dialogs_views_mac.h"
11 #include "chrome/browser/ui/cocoa/bubble_anchor_helper_views.h" 13 #include "chrome/browser/ui/cocoa/bubble_anchor_helper_views.h"
12 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h" 14 #include "chrome/browser/ui/content_settings/content_setting_bubble_model.h"
13 #include "chrome/browser/ui/views/bookmarks/bookmark_bubble_view.h" 15 #include "chrome/browser/ui/views/bookmarks/bookmark_bubble_view.h"
14 #include "chrome/browser/ui/views/content_setting_bubble_contents.h" 16 #include "chrome/browser/ui/views/content_setting_bubble_contents.h"
17 #include "chrome/browser/ui/views/create_application_shortcut_view.h"
15 #include "chrome/browser/ui/views/location_bar/zoom_bubble_view.h" 18 #include "chrome/browser/ui/views/location_bar/zoom_bubble_view.h"
16 #include "chrome/browser/ui/views/page_info/page_info_bubble_view.h" 19 #include "chrome/browser/ui/views/page_info/page_info_bubble_view.h"
17 #include "chrome/browser/ui/views/task_manager_view.h" 20 #include "chrome/browser/ui/views/task_manager_view.h"
18 #include "chrome/browser/ui/views/update_recommended_message_box.h" 21 #include "chrome/browser/ui/views/update_recommended_message_box.h"
22 #include "components/constrained_window/constrained_window_views.h"
19 23
20 // This file provides definitions of desktop browser dialog-creation methods for 24 // This file provides definitions of desktop browser dialog-creation methods for
21 // Mac where a Cocoa browser is using Views dialogs. I.e. it is included in the 25 // Mac where a Cocoa browser is using Views dialogs. I.e. it is included in the
22 // Cocoa build and definitions under chrome/browser/ui/cocoa may select at 26 // Cocoa build and definitions under chrome/browser/ui/cocoa may select at
23 // runtime whether to show a Cocoa dialog, or the toolkit-views dialog defined 27 // runtime whether to show a Cocoa dialog, or the toolkit-views dialog defined
24 // here (declared in browser_dialogs.h). 28 // here (declared in browser_dialogs.h).
25 29
26 namespace chrome { 30 namespace chrome {
27 31
28 void ShowPageInfoBubbleViewsAtPoint( 32 void ShowPageInfoBubbleViewsAtPoint(
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 contents->set_parent_window(parent_view); 116 contents->set_parent_window(parent_view);
113 contents->SetAnchorRect(gfx::Rect(anchor, gfx::Size())); 117 contents->SetAnchorRect(gfx::Rect(anchor, gfx::Size()));
114 views::BubbleDialogDelegateView::CreateBubble(contents)->Show(); 118 views::BubbleDialogDelegateView::CreateBubble(contents)->Show();
115 KeepBubbleAnchored(contents, decoration); 119 KeepBubbleAnchored(contents, decoration);
116 } 120 }
117 121
118 void ShowUpdateChromeDialogViews(gfx::NativeWindow parent) { 122 void ShowUpdateChromeDialogViews(gfx::NativeWindow parent) {
119 UpdateRecommendedMessageBox::Show(parent); 123 UpdateRecommendedMessageBox::Show(parent);
120 } 124 }
121 125
126 void ShowCreateChromeAppShortcutsDialogViews(
127 gfx::NativeWindow parent_window,
128 Profile* profile,
129 const extensions::Extension* app,
130 const base::Callback<void(bool)>& close_callback) {
131 constrained_window::CreateBrowserModalDialogViews(
132 new CreateChromeApplicationShortcutView(profile, app, close_callback),
133 parent_window)
134 ->Show();
135 }
136
122 } // namespace chrome 137 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/browser_dialogs_views_mac.h ('k') | chrome/browser/ui/cocoa/create_application_shortcut_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698