Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "chrome/browser/ui/chrome_bubble_manager.h" | |
| 6 | |
| 7 #include "content/public/browser/browser_thread.h" | |
| 8 | |
| 9 ChromeBubbleManager::ChromeBubbleManager() {} | |
| 10 | |
| 11 ChromeBubbleManager::~ChromeBubbleManager() {} | |
| 12 | |
| 13 void ChromeBubbleManager::FullscreenToggle() { | |
| 14 CloseAllBubbles(BUBBLE_CLOSE_FULLSCREEN); | |
| 15 // Any bubble that didn't close should update its anchor position. | |
| 16 UpdateAllBubbleAnchors(); | |
| 17 } | |
| 18 | |
| 19 void ChromeBubbleManager::TabBlur() { | |
| 20 CloseAllBubbles(BUBBLE_CLOSE_TABSWITCH); | |
| 21 } | |
| 22 | |
| 23 void ChromeBubbleManager::TabFocus() { | |
|
hcarmona
2015/08/18 02:25:02
Does the bubble manager need to do anything when a
msw
2015/08/18 17:26:20
It shouldn't need to do anything, afaik.
hcarmona
2015/08/18 23:08:48
Then, I'll go ahead and remove this function. :-)
| |
| 24 // TODO(hcarmona): What should bubbles do, if anything? | |
| 25 } | |
| 26 | |
| 27 void ChromeBubbleManager::TabDetached() { | |
| 28 CloseAllBubbles(BUBBLE_CLOSE_TABDETACHED); | |
| 29 // Any bubble that didn't close should update its anchor position. | |
| 30 UpdateAllBubbleAnchors(); | |
| 31 } | |
| 32 | |
| 33 void ChromeBubbleManager::NavigationEntryCommitted() { | |
| 34 CloseAllBubbles(BUBBLE_CLOSE_NAVIGATION); | |
| 35 } | |
| 36 | |
| 37 void ChromeBubbleManager::ShowBubbleUI( | |
| 38 base::WeakPtr<BubbleController> controller) { | |
| 39 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); | |
| 40 BubbleManager::ShowBubbleUI(controller); | |
| 41 } | |
| 42 | |
| 43 bool ChromeBubbleManager::ShouldClose( | |
| 44 base::WeakPtr<BubbleController> controller, | |
| 45 BubbleCloseReason reason) { | |
| 46 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); | |
| 47 return BubbleManager::ShouldClose(controller, reason); | |
| 48 } | |
| 49 | |
| 50 void ChromeBubbleManager::UpdateAnchorPosition( | |
| 51 base::WeakPtr<BubbleController> controller) { | |
| 52 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); | |
| 53 BubbleManager::UpdateAnchorPosition(controller); | |
| 54 } | |
| OLD | NEW |