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

Side by Side Diff: chrome/browser/ui/bluetooth/bluetooth_chooser_bubble_delegate.cc

Issue 1572743002: Make sure bubbles in Views default to close before their RenderFrameHosts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: Move DCHECK string into longer comment Created 4 years, 10 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 "chrome/browser/ui/bluetooth/bluetooth_chooser_bubble_delegate.h" 5 #include "chrome/browser/ui/bluetooth/bluetooth_chooser_bubble_delegate.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "chrome/browser/ui/bluetooth/bluetooth_chooser_desktop.h" 8 #include "chrome/browser/ui/bluetooth/bluetooth_chooser_desktop.h"
9 #include "components/bubble/bubble_controller.h" 9 #include "components/bubble/bubble_controller.h"
10 10
11 BluetoothChooserBubbleDelegate::BluetoothChooserBubbleDelegate(Browser* browser) 11 BluetoothChooserBubbleDelegate::BluetoothChooserBubbleDelegate(
12 : ChooserBubbleDelegate(browser), bluetooth_chooser_(nullptr) {} 12 content::RenderFrameHost* owner)
13 : ChooserBubbleDelegate(owner), bluetooth_chooser_(nullptr) {}
13 14
14 BluetoothChooserBubbleDelegate::~BluetoothChooserBubbleDelegate() { 15 BluetoothChooserBubbleDelegate::~BluetoothChooserBubbleDelegate() {
15 if (bluetooth_chooser_) 16 if (bluetooth_chooser_)
16 bluetooth_chooser_->set_bluetooth_chooser_bubble_delegate(nullptr); 17 bluetooth_chooser_->set_bluetooth_chooser_bubble_delegate(nullptr);
17 } 18 }
18 19
19 size_t BluetoothChooserBubbleDelegate::NumOptions() const { 20 size_t BluetoothChooserBubbleDelegate::NumOptions() const {
20 return device_names_and_ids_.size(); 21 return device_names_and_ids_.size();
21 } 22 }
22 23
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 it != device_names_and_ids_.end(); ++it) { 70 it != device_names_and_ids_.end(); ++it) {
70 if (it->second == device_id) { 71 if (it->second == device_id) {
71 size_t index = it - device_names_and_ids_.begin(); 72 size_t index = it - device_names_and_ids_.begin();
72 device_names_and_ids_.erase(it); 73 device_names_and_ids_.erase(it);
73 if (observer()) 74 if (observer())
74 observer()->OnOptionRemoved(index); 75 observer()->OnOptionRemoved(index);
75 return; 76 return;
76 } 77 }
77 } 78 }
78 } 79 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/bluetooth/bluetooth_chooser_bubble_delegate.h ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698