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/views/browser_actions_container.cc

Issue 6480001: Migrate Event API methods to Google Style. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/browser_actions_container.h" 5 #include "chrome/browser/ui/views/browser_actions_container.h"
6 6
7 #include "base/stl_util-inl.h" 7 #include "base/stl_util-inl.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/browser_window.h" 10 #include "chrome/browser/browser_window.h"
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 692
693 void BrowserActionsContainer::OnDragExited() { 693 void BrowserActionsContainer::OnDragExited() {
694 StopShowFolderDropMenuTimer(); 694 StopShowFolderDropMenuTimer();
695 drop_indicator_position_ = -1; 695 drop_indicator_position_ = -1;
696 SchedulePaint(); 696 SchedulePaint();
697 } 697 }
698 698
699 int BrowserActionsContainer::OnPerformDrop( 699 int BrowserActionsContainer::OnPerformDrop(
700 const views::DropTargetEvent& event) { 700 const views::DropTargetEvent& event) {
701 BrowserActionDragData data; 701 BrowserActionDragData data;
702 if (!data.Read(event.GetData())) 702 if (!data.Read(event.data()))
703 return ui::DragDropTypes::DRAG_NONE; 703 return ui::DragDropTypes::DRAG_NONE;
704 704
705 // Make sure we have the same view as we started with. 705 // Make sure we have the same view as we started with.
706 DCHECK_EQ(browser_action_views_[data.index()]->button()->extension()->id(), 706 DCHECK_EQ(browser_action_views_[data.index()]->button()->extension()->id(),
707 data.id()); 707 data.id());
708 DCHECK(model_); 708 DCHECK(model_);
709 709
710 size_t i = 0; 710 size_t i = 0;
711 for (; i < browser_action_views_.size(); ++i) { 711 for (; i < browser_action_views_.size(); ++i) {
712 int view_x = browser_action_views_[i]->GetMirroredBounds().x(); 712 int view_x = browser_action_views_[i]->GetMirroredBounds().x();
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
1096 AnimationEnded(resize_animation_.get()); 1096 AnimationEnded(resize_animation_.get());
1097 } 1097 }
1098 } 1098 }
1099 1099
1100 bool BrowserActionsContainer::ShouldDisplayBrowserAction( 1100 bool BrowserActionsContainer::ShouldDisplayBrowserAction(
1101 const Extension* extension) { 1101 const Extension* extension) {
1102 // Only display incognito-enabled extensions while in incognito mode. 1102 // Only display incognito-enabled extensions while in incognito mode.
1103 return (!profile_->IsOffTheRecord() || 1103 return (!profile_->IsOffTheRecord() ||
1104 profile_->GetExtensionService()->IsIncognitoEnabled(extension)); 1104 profile_->GetExtensionService()->IsIncognitoEnabled(extension));
1105 } 1105 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698