| OLD | NEW |
| 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/cocoa/bubble_anchor_helper_views.h" | 10 #include "chrome/browser/ui/cocoa/bubble_anchor_helper_views.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 // consistent with the non-Mac views implementation. | 34 // consistent with the non-Mac views implementation. |
| 35 // Note that when the browser is toolkit-views, IsBubbleShowing() is checked | 35 // Note that when the browser is toolkit-views, IsBubbleShowing() is checked |
| 36 // earlier because the bubble is shown on mouse release (but dismissed on | 36 // earlier because the bubble is shown on mouse release (but dismissed on |
| 37 // mouse pressed). A Cocoa browser does both on mouse pressed, so a check | 37 // mouse pressed). A Cocoa browser does both on mouse pressed, so a check |
| 38 // when showing is sufficient. | 38 // when showing is sufficient. |
| 39 if (PageInfoBubbleView::GetShownBubbleType() != | 39 if (PageInfoBubbleView::GetShownBubbleType() != |
| 40 PageInfoBubbleView::BUBBLE_NONE) { | 40 PageInfoBubbleView::BUBBLE_NONE) { |
| 41 return; | 41 return; |
| 42 } | 42 } |
| 43 | 43 |
| 44 PageInfoBubbleView::ShowBubble(nullptr, gfx::Rect(anchor_point, gfx::Size()), | 44 PageInfoBubbleView::ShowBubble(nullptr, nullptr, |
| 45 profile, web_contents, virtual_url, | 45 gfx::Rect(anchor_point, gfx::Size()), profile, |
| 46 security_info); | 46 web_contents, virtual_url, security_info); |
| 47 } | 47 } |
| 48 | 48 |
| 49 void ShowBookmarkBubbleViewsAtPoint(const gfx::Point& anchor_point, | 49 void ShowBookmarkBubbleViewsAtPoint(const gfx::Point& anchor_point, |
| 50 gfx::NativeView parent, | 50 gfx::NativeView parent, |
| 51 bookmarks::BookmarkBubbleObserver* observer, | 51 bookmarks::BookmarkBubbleObserver* observer, |
| 52 Browser* browser, | 52 Browser* browser, |
| 53 const GURL& virtual_url, | 53 const GURL& virtual_url, |
| 54 bool already_bookmarked) { | 54 bool already_bookmarked) { |
| 55 // The Views dialog may prompt for sign in. | 55 // The Views dialog may prompt for sign in. |
| 56 std::unique_ptr<BubbleSyncPromoDelegate> delegate( | 56 std::unique_ptr<BubbleSyncPromoDelegate> delegate( |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 contents->set_parent_window(parent_view); | 103 contents->set_parent_window(parent_view); |
| 104 contents->SetAnchorRect(gfx::Rect(anchor, gfx::Size())); | 104 contents->SetAnchorRect(gfx::Rect(anchor, gfx::Size())); |
| 105 views::BubbleDialogDelegateView::CreateBubble(contents)->Show(); | 105 views::BubbleDialogDelegateView::CreateBubble(contents)->Show(); |
| 106 } | 106 } |
| 107 | 107 |
| 108 void ShowUpdateChromeDialogViews(gfx::NativeWindow parent) { | 108 void ShowUpdateChromeDialogViews(gfx::NativeWindow parent) { |
| 109 UpdateRecommendedMessageBox::Show(parent); | 109 UpdateRecommendedMessageBox::Show(parent); |
| 110 } | 110 } |
| 111 | 111 |
| 112 } // namespace chrome | 112 } // namespace chrome |
| OLD | NEW |