OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/views/browser_actions_container.h" | 5 #include "chrome/browser/views/browser_actions_container.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
9 #include "app/slide_animation.h" | 9 #include "app/slide_animation.h" |
10 #include "base/stl_util-inl.h" | 10 #include "base/stl_util-inl.h" |
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
610 // want the browser action container to be visible. | 610 // want the browser action container to be visible. |
611 ToolbarView* parent = reinterpret_cast<ToolbarView*>(GetParent()); | 611 ToolbarView* parent = reinterpret_cast<ToolbarView*>(GetParent()); |
612 | 612 |
613 if (browser_action_views_.size() == 0 || parent->collapsed()) { | 613 if (browser_action_views_.size() == 0 || parent->collapsed()) { |
614 SetVisible(false); | 614 SetVisible(false); |
615 resize_gripper_->SetVisible(false); | 615 resize_gripper_->SetVisible(false); |
616 chevron_->SetVisible(false); | 616 chevron_->SetVisible(false); |
617 return; | 617 return; |
618 } else { | 618 } else { |
619 SetVisible(true); | 619 SetVisible(true); |
| 620 resize_gripper_->SetVisible(true); |
620 } | 621 } |
621 | 622 |
622 int x = 0; | 623 int x = 0; |
623 if (resize_gripper_->IsVisible()) { | 624 if (resize_gripper_->IsVisible()) { |
624 // We'll draw the resize gripper a little wider, to add some invisible hit | 625 // We'll draw the resize gripper a little wider, to add some invisible hit |
625 // target area - but we don't account for it anywhere. | 626 // target area - but we don't account for it anywhere. |
626 gfx::Size sz = resize_gripper_->GetPreferredSize(); | 627 gfx::Size sz = resize_gripper_->GetPreferredSize(); |
627 resize_gripper_->SetBounds(x, (height() - sz.height()) / 2 + 1, | 628 resize_gripper_->SetBounds(x, (height() - sz.height()) / 2 + 1, |
628 sz.width() + kExtraResizeArea, sz.height()); | 629 sz.width() + kExtraResizeArea, sz.height()); |
629 x += sz.width(); | 630 x += sz.width(); |
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1155 popup_ = NULL; | 1156 popup_ = NULL; |
1156 popup_button_->SetButtonNotPushed(); | 1157 popup_button_->SetButtonNotPushed(); |
1157 popup_button_ = NULL; | 1158 popup_button_ = NULL; |
1158 } | 1159 } |
1159 | 1160 |
1160 bool BrowserActionsContainer::ShouldDisplayBrowserAction(Extension* extension) { | 1161 bool BrowserActionsContainer::ShouldDisplayBrowserAction(Extension* extension) { |
1161 // Only display incognito-enabled extensions while in incognito mode. | 1162 // Only display incognito-enabled extensions while in incognito mode. |
1162 return (!profile_->IsOffTheRecord() || | 1163 return (!profile_->IsOffTheRecord() || |
1163 profile_->GetExtensionsService()->IsIncognitoEnabled(extension)); | 1164 profile_->GetExtensionsService()->IsIncognitoEnabled(extension)); |
1164 } | 1165 } |
OLD | NEW |