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

Side by Side Diff: chrome/browser/ui/views/website_settings/permissions_bubble_view.cc

Issue 1133283006: [PermissionBubble] Handle ownership management x-platform. Base URL: https://chromium.googlesource.com/chromium/src.git@argfix
Patch Set: And remove the platform-specific stuff. Created 5 years, 7 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/views/website_settings/permissions_bubble_view.h" 5 #include "chrome/browser/ui/views/website_settings/permissions_bubble_view.h"
6 6
7 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "base/strings/string16.h" 8 #include "base/strings/string16.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 frame->SetBubbleBorder(scoped_ptr<views::BubbleBorder>( 388 frame->SetBubbleBorder(scoped_ptr<views::BubbleBorder>(
389 new views::BubbleBorder(adjusted_arrow, shadow(), color()))); 389 new views::BubbleBorder(adjusted_arrow, shadow(), color())));
390 390
391 // Reposition the bubble based on the updated arrow and view. 391 // Reposition the bubble based on the updated arrow and view.
392 SetAnchorView(anchor_view); 392 SetAnchorView(anchor_view);
393 } 393 }
394 394
395 ////////////////////////////////////////////////////////////////////////////// 395 //////////////////////////////////////////////////////////////////////////////
396 // PermissionBubbleViewViews 396 // PermissionBubbleViewViews
397 397
398 // static
399 PermissionBubbleView* PermissionBubbleView::Create(Browser* browser) {
400 return new PermissionBubbleViewViews(browser);
401 }
402
398 PermissionBubbleViewViews::PermissionBubbleViewViews(Browser* browser) 403 PermissionBubbleViewViews::PermissionBubbleViewViews(Browser* browser)
399 : browser_(browser), 404 : browser_(browser),
400 delegate_(nullptr), 405 delegate_(nullptr),
401 bubble_delegate_(nullptr) {} 406 bubble_delegate_(nullptr) {}
402 407
403 PermissionBubbleViewViews::~PermissionBubbleViewViews() { 408 PermissionBubbleViewViews::~PermissionBubbleViewViews() {
404 if (delegate_) 409 if (delegate_)
405 delegate_->SetView(nullptr); 410 delegate_->SetView(nullptr);
406 } 411 }
407 412
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 487
483 void PermissionBubbleViewViews::Accept() { 488 void PermissionBubbleViewViews::Accept() {
484 if (delegate_) 489 if (delegate_)
485 delegate_->Accept(); 490 delegate_->Accept();
486 } 491 }
487 492
488 void PermissionBubbleViewViews::Deny() { 493 void PermissionBubbleViewViews::Deny() {
489 if (delegate_) 494 if (delegate_)
490 delegate_->Deny(); 495 delegate_->Deny();
491 } 496 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | chrome/browser/ui/website_settings/permission_bubble_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698