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

Unified Diff: chrome/browser/ui/views/browser_actions_container.cc

Issue 7057014: Variety of tweaks to View API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/browser_actions_container.cc
===================================================================
--- chrome/browser/ui/views/browser_actions_container.cc (revision 86083)
+++ chrome/browser/ui/views/browser_actions_container.cc (working copy)
@@ -361,7 +361,7 @@
drop_indicator_position_(-1),
ALLOW_THIS_IN_INITIALIZER_LIST(task_factory_(this)),
ALLOW_THIS_IN_INITIALIZER_LIST(show_menu_task_factory_(this)) {
- SetID(VIEW_ID_BROWSER_ACTION_TOOLBAR);
+ set_id(VIEW_ID_BROWSER_ACTION_TOOLBAR);
if (profile_->GetExtensionService()) {
model_ = profile_->GetExtensionService()->toolbar_model();
@@ -469,7 +469,7 @@
size_t BrowserActionsContainer::VisibleBrowserActions() const {
size_t visible_actions = 0;
for (size_t i = 0; i < browser_action_views_.size(); ++i) {
- if (browser_action_views_[i]->IsVisible())
+ if (browser_action_views_[i]->visible())
++visible_actions;
}
return visible_actions;
@@ -502,7 +502,7 @@
// We can get the execute event for browser actions that are not visible,
// since buttons can be activated from the overflow menu (chevron). In that
// case we show the popup as originating from the chevron.
- View* reference_view = button->parent()->IsVisible() ? button : chevron_;
+ View* reference_view = button->parent()->visible() ? button : chevron_;
gfx::Point origin;
View::ConvertPointToScreen(reference_view, &origin);
gfx::Rect rect = reference_view->bounds();
@@ -672,7 +672,7 @@
size_t i = 0;
for (; i < browser_action_views_.size(); ++i) {
int view_x = browser_action_views_[i]->GetMirroredBounds().x();
- if (!browser_action_views_[i]->IsVisible() ||
+ if (!browser_action_views_[i]->visible() ||
(base::i18n::IsRTL() ? (view_x < drop_indicator_position_) :
(view_x >= drop_indicator_position_))) {
// We have reached the end of the visible icons or found one that has a
@@ -822,7 +822,7 @@
void BrowserActionsContainer::TestSetIconVisibilityCount(size_t icons) {
model_->SetVisibleIconCount(icons);
chevron_->SetVisible(icons < browser_action_views_.size());
- container_width_ = IconCountToWidth(icons, chevron_->IsVisible());
+ container_width_ = IconCountToWidth(icons, chevron_->visible());
Layout();
SchedulePaint();
}
@@ -997,7 +997,7 @@
if (visible_actions < 0) // All icons should be visible.
visible_actions = model_->size();
chevron_->SetVisible(static_cast<size_t>(visible_actions) < model_->size());
- container_width_ = IconCountToWidth(visible_actions, chevron_->IsVisible());
+ container_width_ = IconCountToWidth(visible_actions, chevron_->visible());
}
void BrowserActionsContainer::CloseOverflowMenu() {
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_editor_view.cc ('k') | chrome/browser/ui/views/collected_cookies_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698