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

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

Issue 2524213002: MacViews: Consolidate flags. Just use --secondary-ui-md to enable MacViews. (Closed)
Patch Set: rebase for r435075 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 | « chrome/browser/ui/javascript_dialogs/javascript_dialog_mac.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <utility> 5 #include <utility>
6 6
7 #include "chrome/browser/ui/bookmarks/bookmark_bubble_sign_in_delegate.h" 7 #include "chrome/browser/ui/bookmarks/bookmark_bubble_sign_in_delegate.h"
8 #include "chrome/browser/ui/browser.h" 8 #include "chrome/browser/ui/browser.h"
9 #include "chrome/browser/ui/browser_dialogs.h" 9 #include "chrome/browser/ui/browser_dialogs.h"
10 #include "chrome/browser/ui/views/bookmarks/bookmark_bubble_view.h" 10 #include "chrome/browser/ui/views/bookmarks/bookmark_bubble_view.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 // The Views dialog may prompt for sign in. 52 // The Views dialog may prompt for sign in.
53 std::unique_ptr<BubbleSyncPromoDelegate> delegate( 53 std::unique_ptr<BubbleSyncPromoDelegate> delegate(
54 new BookmarkBubbleSignInDelegate(browser)); 54 new BookmarkBubbleSignInDelegate(browser));
55 55
56 BookmarkBubbleView::ShowBubble( 56 BookmarkBubbleView::ShowBubble(
57 nullptr, gfx::Rect(anchor_point, gfx::Size()), parent, observer, 57 nullptr, gfx::Rect(anchor_point, gfx::Size()), parent, observer,
58 std::move(delegate), browser->profile(), virtual_url, already_bookmarked); 58 std::move(delegate), browser->profile(), virtual_url, already_bookmarked);
59 } 59 }
60 60
61 task_manager::TaskManagerTableModel* ShowTaskManagerViews(Browser* browser) { 61 task_manager::TaskManagerTableModel* ShowTaskManagerViews(Browser* browser) {
62 // On platforms other than Mac, the Views task manager is shown unless
63 // explicitly disabled. Assume that running with ToolkitViewsDialogsEnabled()
64 // on Mac also means the Views task manager is desired.
65 return task_manager::TaskManagerView::Show(browser); 62 return task_manager::TaskManagerView::Show(browser);
66 } 63 }
67 64
68 void HideTaskManagerViews() { 65 void HideTaskManagerViews() {
69 task_manager::TaskManagerView::Hide(); 66 task_manager::TaskManagerView::Hide();
70 } 67 }
71 68
72 void ContentSettingBubbleViewsBridge::Show(gfx::NativeView parent_view, 69 void ContentSettingBubbleViewsBridge::Show(gfx::NativeView parent_view,
73 ContentSettingBubbleModel* model, 70 ContentSettingBubbleModel* model,
74 content::WebContents* web_contents, 71 content::WebContents* web_contents,
75 const gfx::Point& anchor) { 72 const gfx::Point& anchor) {
76 ContentSettingBubbleContents* contents = 73 ContentSettingBubbleContents* contents =
77 new ContentSettingBubbleContents(model, web_contents, nullptr, 74 new ContentSettingBubbleContents(model, web_contents, nullptr,
78 views::BubbleBorder::Arrow::TOP_RIGHT); 75 views::BubbleBorder::Arrow::TOP_RIGHT);
79 contents->set_parent_window(parent_view); 76 contents->set_parent_window(parent_view);
80 contents->SetAnchorRect(gfx::Rect(anchor, gfx::Size())); 77 contents->SetAnchorRect(gfx::Rect(anchor, gfx::Size()));
81 views::BubbleDialogDelegateView::CreateBubble(contents)->Show(); 78 views::BubbleDialogDelegateView::CreateBubble(contents)->Show();
82 } 79 }
83 80
84 } // namespace chrome 81 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/javascript_dialogs/javascript_dialog_mac.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698