| 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 "chrome/browser/ui/chrome_bubble_manager.h" | 5 #include "chrome/browser/ui/chrome_bubble_manager.h" |
| 6 | 6 |
| 7 #include "base/location.h" | 7 #include "base/location.h" |
| 8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
| 9 #include "chrome/browser/ui/browser_finder.h" | 9 #include "chrome/browser/ui/browser_finder.h" |
| 10 #include "chrome/browser/ui/chrome_bubble_manager_factory.h" | 10 #include "chrome/browser/ui/chrome_bubble_manager_factory.h" |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 if (!details.is_in_page || | 92 if (!details.is_in_page || |
| 93 details.type == content::NAVIGATION_TYPE_SAME_PAGE || | 93 details.type == content::NAVIGATION_TYPE_SAME_PAGE || |
| 94 details.type == content::NAVIGATION_TYPE_EXISTING_PAGE) { | 94 details.type == content::NAVIGATION_TYPE_EXISTING_PAGE) { |
| 95 CloseMatchingBubbles(context, FORCE_CLOSE, BUBBLE_CLOSE_IGNORE); | 95 CloseMatchingBubbles(context, FORCE_CLOSE, BUBBLE_CLOSE_IGNORE); |
| 96 } | 96 } |
| 97 } | 97 } |
| 98 | 98 |
| 99 void ChromeBubbleManager::WebContentsDestroyed(content::WebContents* context) { | 99 void ChromeBubbleManager::WebContentsDestroyed(content::WebContents* context) { |
| 100 CloseMatchingBubbles(context, FORCE_CLOSE, BUBBLE_CLOSE_IGNORE); | 100 CloseMatchingBubbles(context, FORCE_CLOSE, BUBBLE_CLOSE_IGNORE); |
| 101 } | 101 } |
| 102 |
| 103 void ChromeBubbleManager::UpdateAnchorPosition(content::WebContents* context) { |
| 104 MassUpdateBubbles(context, base::Bind(&ChromeBubbleManager::UpdateBubbleUI, |
| 105 this->AsWeakPtr())); |
| 106 } |
| 107 |
| 108 void ChromeBubbleManager::UserDismissBubbles(content::WebContents* context) { |
| 109 CloseMatchingBubbles(context, FORCE_CLOSE, BUBBLE_CLOSE_CLOSE); |
| 110 } |
| OLD | NEW |