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

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

Issue 2148243004: chrome::ShowTaskManager: refine return type to eliminate a downcast. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@triple_click_tm
Patch Set: Fix mac compile. Created 4 years, 5 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
« no previous file with comments | « chrome/browser/ui/views/browser_dialogs_views.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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 bool already_bookmarked) { 49 bool already_bookmarked) {
50 // The Views dialog may prompt for sign in. 50 // The Views dialog may prompt for sign in.
51 std::unique_ptr<BubbleSyncPromoDelegate> delegate( 51 std::unique_ptr<BubbleSyncPromoDelegate> delegate(
52 new BookmarkBubbleSignInDelegate(browser)); 52 new BookmarkBubbleSignInDelegate(browser));
53 53
54 BookmarkBubbleView::ShowBubble( 54 BookmarkBubbleView::ShowBubble(
55 nullptr, gfx::Rect(anchor_point, gfx::Size()), parent, observer, 55 nullptr, gfx::Rect(anchor_point, gfx::Size()), parent, observer,
56 std::move(delegate), browser->profile(), virtual_url, already_bookmarked); 56 std::move(delegate), browser->profile(), virtual_url, already_bookmarked);
57 } 57 }
58 58
59 ui::TableModel* ShowTaskManagerViews(Browser* browser) { 59 task_management::TaskManagerTableModel* ShowTaskManagerViews(Browser* browser) {
60 // On platforms other than Mac, the new task manager is shown unless 60 // On platforms other than Mac, the new task manager is shown unless
61 // explicitly disabled. Assume that running with ToolkitViewsDialogsEnabled() 61 // explicitly disabled. Assume that running with ToolkitViewsDialogsEnabled()
62 // on Mac also means the new task manager is desired. 62 // on Mac also means the new task manager is desired.
63 return task_management::NewTaskManagerView::Show(browser); 63 return task_management::NewTaskManagerView::Show(browser);
64 } 64 }
65 65
66 void HideTaskManagerViews() { 66 void HideTaskManagerViews() {
67 task_management::NewTaskManagerView::Hide(); 67 task_management::NewTaskManagerView::Hide();
68 } 68 }
69 69
70 void ContentSettingBubbleViewsBridge::Show(gfx::NativeView parent_view, 70 void ContentSettingBubbleViewsBridge::Show(gfx::NativeView parent_view,
71 ContentSettingBubbleModel* model, 71 ContentSettingBubbleModel* model,
72 content::WebContents* web_contents, 72 content::WebContents* web_contents,
73 const gfx::Point& anchor) { 73 const gfx::Point& anchor) {
74 ContentSettingBubbleContents* contents = 74 ContentSettingBubbleContents* contents =
75 new ContentSettingBubbleContents(model, web_contents, nullptr, 75 new ContentSettingBubbleContents(model, web_contents, nullptr,
76 views::BubbleBorder::Arrow::TOP_RIGHT); 76 views::BubbleBorder::Arrow::TOP_RIGHT);
77 contents->set_parent_window(parent_view); 77 contents->set_parent_window(parent_view);
78 contents->SetAnchorRect(gfx::Rect(anchor, gfx::Size())); 78 contents->SetAnchorRect(gfx::Rect(anchor, gfx::Size()));
79 views::BubbleDialogDelegateView::CreateBubble(contents)->Show(); 79 views::BubbleDialogDelegateView::CreateBubble(contents)->Show();
80 } 80 }
81 81
82 } // namespace chrome 82 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/browser_dialogs_views.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698