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

Side by Side Diff: chrome/browser/ui/extensions/extension_action_view_controller.cc

Issue 2857653002: Fix BrowserActionsBarBrowserTest.OverflowedBrowserActionPopupTestRemoval in ASan with new libc++. (Closed)
Patch Set: worse! Created 3 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/extensions/extension_action_view_controller.h" 5 #include "chrome/browser/ui/extensions/extension_action_view_controller.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 return extension_->id(); 67 return extension_->id();
68 } 68 }
69 69
70 void ExtensionActionViewController::SetDelegate( 70 void ExtensionActionViewController::SetDelegate(
71 ToolbarActionViewDelegate* delegate) { 71 ToolbarActionViewDelegate* delegate) {
72 DCHECK((delegate == nullptr) ^ (view_delegate_ == nullptr)); 72 DCHECK((delegate == nullptr) ^ (view_delegate_ == nullptr));
73 if (delegate) { 73 if (delegate) {
74 view_delegate_ = delegate; 74 view_delegate_ = delegate;
75 platform_delegate_->OnDelegateSet(); 75 platform_delegate_->OnDelegateSet();
76 } else { 76 } else {
77 if (is_showing_popup()) 77 DCHECK(!is_showing_popup());
78 HidePopup();
79 platform_delegate_.reset(); 78 platform_delegate_.reset();
80 view_delegate_ = nullptr; 79 view_delegate_ = nullptr;
81 } 80 }
82 } 81 }
83 82
84 gfx::Image ExtensionActionViewController::GetIcon( 83 gfx::Image ExtensionActionViewController::GetIcon(
85 content::WebContents* web_contents, 84 content::WebContents* web_contents,
86 const gfx::Size& size) { 85 const gfx::Size& size) {
87 if (!ExtensionIsValid()) 86 if (!ExtensionIsValid())
88 return gfx::Image(); 87 return gfx::Image();
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 extension_action_->GetIsVisible( 417 extension_action_->GetIsVisible(
419 SessionTabHelper::IdForTab(web_contents)); 418 SessionTabHelper::IdForTab(web_contents));
420 } 419 }
421 420
422 bool ExtensionActionViewController::HasBeenBlocked( 421 bool ExtensionActionViewController::HasBeenBlocked(
423 content::WebContents* web_contents) const { 422 content::WebContents* web_contents) const {
424 ExtensionActionRunner* action_runner = 423 ExtensionActionRunner* action_runner =
425 ExtensionActionRunner::GetForWebContents(web_contents); 424 ExtensionActionRunner::GetForWebContents(web_contents);
426 return action_runner && action_runner->WantsToRun(extension()); 425 return action_runner && action_runner->WantsToRun(extension());
427 } 426 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/extensions/browser_actions_controller.mm ('k') | chrome/browser/ui/toolbar/toolbar_actions_bar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698