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

Side by Side Diff: chrome/browser/ui/website_settings/permission_bubble_delegate.cc

Issue 1251633002: Add BubbleManager to manage bubbles and ChromeBubbleManager for events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Apply Feedback Created 5 years, 4 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
(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/website_settings/permission_bubble_delegate.h"
6
7 #include "chrome/browser/ui/website_settings/permission_bubble_manager.h"
8 #include "components/bubble/bubble_ui.h"
9
10 PermissionBubbleDelegate::PermissionBubbleDelegate(
11 base::Callback<scoped_ptr<BubbleUI>(PermissionBubbleManager*)> ui_factory,
12 PermissionBubbleManager* manager)
13 : ui_factory_(ui_factory), manager_(manager) {}
14
15 PermissionBubbleDelegate::~PermissionBubbleDelegate() {}
16
17 void PermissionBubbleDelegate::DidClose() {
18 manager_->DidClose();
19 }
20
21 bool PermissionBubbleDelegate::ShouldCloseOnHide() const {
22 return false;
23 }
24
25 scoped_ptr<BubbleUI> PermissionBubbleDelegate::BuildBubbleUI() {
26 return PermissionBubbleDelegate::CreateBubble(manager_);
27 }
28
29 void* PermissionBubbleDelegate::GetContext() const {
30 return manager_->web_contents();
31 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698