OLD | NEW |
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/bind.h" | 7 #include "base/bind.h" |
8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 821 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
832 // dragging (like we do for tab dragging). | 832 // dragging (like we do for tab dragging). |
833 if (drop_indicator_position_ > -1) { | 833 if (drop_indicator_position_ > -1) { |
834 // The two-pixel width drop indicator. | 834 // The two-pixel width drop indicator. |
835 static const int kDropIndicatorWidth = 2; | 835 static const int kDropIndicatorWidth = 2; |
836 gfx::Rect indicator_bounds( | 836 gfx::Rect indicator_bounds( |
837 drop_indicator_position_ - (kDropIndicatorWidth / 2), | 837 drop_indicator_position_ - (kDropIndicatorWidth / 2), |
838 ToolbarView::kVertSpacing, kDropIndicatorWidth, IconHeight()); | 838 ToolbarView::kVertSpacing, kDropIndicatorWidth, IconHeight()); |
839 | 839 |
840 // Color of the drop indicator. | 840 // Color of the drop indicator. |
841 static const SkColor kDropIndicatorColor = SK_ColorBLACK; | 841 static const SkColor kDropIndicatorColor = SK_ColorBLACK; |
842 canvas->FillRect(kDropIndicatorColor, indicator_bounds); | 842 canvas->FillRect(indicator_bounds, kDropIndicatorColor); |
843 } | 843 } |
844 } | 844 } |
845 | 845 |
846 void BrowserActionsContainer::OnThemeChanged() { | 846 void BrowserActionsContainer::OnThemeChanged() { |
847 LoadImages(); | 847 LoadImages(); |
848 } | 848 } |
849 | 849 |
850 void BrowserActionsContainer::ViewHierarchyChanged(bool is_add, | 850 void BrowserActionsContainer::ViewHierarchyChanged(bool is_add, |
851 views::View* parent, | 851 views::View* parent, |
852 views::View* child) { | 852 views::View* child) { |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1094 } | 1094 } |
1095 } | 1095 } |
1096 | 1096 |
1097 bool BrowserActionsContainer::ShouldDisplayBrowserAction( | 1097 bool BrowserActionsContainer::ShouldDisplayBrowserAction( |
1098 const Extension* extension) { | 1098 const Extension* extension) { |
1099 // Only display incognito-enabled extensions while in incognito mode. | 1099 // Only display incognito-enabled extensions while in incognito mode. |
1100 return | 1100 return |
1101 (!profile_->IsOffTheRecord() || | 1101 (!profile_->IsOffTheRecord() || |
1102 profile_->GetExtensionService()->IsIncognitoEnabled(extension->id())); | 1102 profile_->GetExtensionService()->IsIncognitoEnabled(extension->id())); |
1103 } | 1103 } |
OLD | NEW |