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

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

Issue 1922683003: Make old task manager tests work against new task manager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix OSX function call namespace Created 4 years, 7 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 <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 28 matching lines...) Expand all
39 bool already_bookmarked) { 39 bool already_bookmarked) {
40 // The Views dialog may prompt for sign in. 40 // The Views dialog may prompt for sign in.
41 std::unique_ptr<BubbleSyncPromoDelegate> delegate( 41 std::unique_ptr<BubbleSyncPromoDelegate> delegate(
42 new BookmarkBubbleSignInDelegate(browser)); 42 new BookmarkBubbleSignInDelegate(browser));
43 43
44 BookmarkBubbleView::ShowBubble(nullptr, gfx::Rect(anchor_point, gfx::Size()), 44 BookmarkBubbleView::ShowBubble(nullptr, gfx::Rect(anchor_point, gfx::Size()),
45 parent, observer, std::move(delegate), 45 parent, observer, std::move(delegate),
46 browser->profile(), url, already_bookmarked); 46 browser->profile(), url, already_bookmarked);
47 } 47 }
48 48
49 void ShowTaskManagerViews(Browser* browser) { 49 ui::TableModel* ShowTaskManagerViews(Browser* browser) {
50 // On platforms other than Mac, the new task manager is shown unless 50 // On platforms other than Mac, the new task manager is shown unless
51 // explicitly disabled. Assume that running with ToolkitViewsDialogsEnabled() 51 // explicitly disabled. Assume that running with ToolkitViewsDialogsEnabled()
52 // on Mac also means the new task manager is desired. 52 // on Mac also means the new task manager is desired.
53 task_management::NewTaskManagerView::Show(browser); 53 return task_management::NewTaskManagerView::Show(browser);
54 } 54 }
55 55
56 void HideTaskManagerViews() { 56 void HideTaskManagerViews() {
57 task_management::NewTaskManagerView::Hide(); 57 task_management::NewTaskManagerView::Hide();
58 } 58 }
59 59
60 void ContentSettingBubbleViewsBridge::Show(gfx::NativeView parent_view, 60 void ContentSettingBubbleViewsBridge::Show(gfx::NativeView parent_view,
61 ContentSettingBubbleModel* model, 61 ContentSettingBubbleModel* model,
62 content::WebContents* web_contents, 62 content::WebContents* web_contents,
63 const gfx::Point& anchor) { 63 const gfx::Point& anchor) {
64 ContentSettingBubbleContents* contents = 64 ContentSettingBubbleContents* contents =
65 new ContentSettingBubbleContents(model, web_contents, nullptr, 65 new ContentSettingBubbleContents(model, web_contents, nullptr,
66 views::BubbleBorder::Arrow::TOP_RIGHT); 66 views::BubbleBorder::Arrow::TOP_RIGHT);
67 contents->set_parent_window(parent_view); 67 contents->set_parent_window(parent_view);
68 contents->SetAnchorRect(gfx::Rect(anchor, gfx::Size())); 68 contents->SetAnchorRect(gfx::Rect(anchor, gfx::Size()));
69 views::BubbleDialogDelegateView::CreateBubble(contents)->Show(); 69 views::BubbleDialogDelegateView::CreateBubble(contents)->Show();
70 } 70 }
71 71
72 } // namespace chrome 72 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/task_manager/task_manager_table_model.h ('k') | chrome/browser/ui/views/new_task_manager_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698