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

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

Issue 1216053013: [Extension Toolbar Redesign] Wants to act treatment, redux - left click (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/extensions/api/commands/command_service.h" 9 #include "chrome/browser/extensions/api/commands/command_service.h"
10 #include "chrome/browser/extensions/api/extension_action/extension_action_api.h" 10 #include "chrome/browser/extensions/api/extension_action/extension_action_api.h"
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 return false; 224 return false;
225 } 225 }
226 226
227 void ExtensionActionViewController::RegisterCommand() { 227 void ExtensionActionViewController::RegisterCommand() {
228 if (!ExtensionIsValid()) 228 if (!ExtensionIsValid())
229 return; 229 return;
230 230
231 platform_delegate_->RegisterCommand(); 231 platform_delegate_->RegisterCommand();
232 } 232 }
233 233
234 bool ExtensionActionViewController::DisabledClickOpensMenu() const {
235 return extensions::FeatureSwitch::extension_action_redesign()->IsEnabled();
236 }
237
234 void ExtensionActionViewController::InspectPopup() { 238 void ExtensionActionViewController::InspectPopup() {
235 ExecuteAction(SHOW_POPUP_AND_INSPECT, true); 239 ExecuteAction(SHOW_POPUP_AND_INSPECT, true);
236 } 240 }
237 241
238 void ExtensionActionViewController::OnIconUpdated() { 242 void ExtensionActionViewController::OnIconUpdated() {
239 if (icon_observer_) 243 if (icon_observer_)
240 icon_observer_->OnIconUpdated(); 244 icon_observer_->OnIconUpdated();
241 if (view_delegate_) 245 if (view_delegate_)
242 view_delegate_->UpdateState(); 246 view_delegate_->UpdateState();
243 } 247 }
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 popup_host_observer_.Remove(popup_host_); 356 popup_host_observer_.Remove(popup_host_);
353 popup_host_ = nullptr; 357 popup_host_ = nullptr;
354 if (toolbar_actions_bar_) { 358 if (toolbar_actions_bar_) {
355 toolbar_actions_bar_->SetPopupOwner(nullptr); 359 toolbar_actions_bar_->SetPopupOwner(nullptr);
356 if (toolbar_actions_bar_->popped_out_action() == this && 360 if (toolbar_actions_bar_->popped_out_action() == this &&
357 !view_delegate_->IsMenuRunning()) 361 !view_delegate_->IsMenuRunning())
358 toolbar_actions_bar_->UndoPopOut(); 362 toolbar_actions_bar_->UndoPopOut();
359 } 363 }
360 view_delegate_->OnPopupClosed(); 364 view_delegate_->OnPopupClosed();
361 } 365 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/extensions/extension_action_view_controller.h ('k') | chrome/browser/ui/toolbar/media_router_action.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698