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

Side by Side Diff: chrome/browser/gtk/bookmark_bar_gtk.cc

Issue 1961001: Refactors animation to allow for cleaner subclassing. I'm doing this (Closed)
Patch Set: Incorporated review feedback Created 10 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 unified diff | Download patch
OLDNEW
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/gtk/bookmark_bar_gtk.h" 5 #include "chrome/browser/gtk/bookmark_bar_gtk.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "app/gtk_dnd_util.h" 9 #include "app/gtk_dnd_util.h"
10 #include "app/l10n_util.h" 10 #include "app/l10n_util.h"
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 Show(false); 385 Show(false);
386 else 386 else
387 gtk_widget_hide(widget()); 387 gtk_widget_hide(widget());
388 } 388 }
389 389
390 int BookmarkBarGtk::GetHeight() { 390 int BookmarkBarGtk::GetHeight() {
391 return event_box_->allocation.height - kBookmarkBarMinimumHeight; 391 return event_box_->allocation.height - kBookmarkBarMinimumHeight;
392 } 392 }
393 393
394 bool BookmarkBarGtk::IsAnimating() { 394 bool BookmarkBarGtk::IsAnimating() {
395 return slide_animation_->IsAnimating(); 395 return slide_animation_->is_animating();
396 } 396 }
397 397
398 bool BookmarkBarGtk::OnNewTabPage() { 398 bool BookmarkBarGtk::OnNewTabPage() {
399 return (browser_ && browser_->GetSelectedTabContents() && 399 return (browser_ && browser_->GetSelectedTabContents() &&
400 browser_->GetSelectedTabContents()->ShouldShowBookmarkBar()); 400 browser_->GetSelectedTabContents()->ShouldShowBookmarkBar());
401 } 401 }
402 402
403 void BookmarkBarGtk::Loaded(BookmarkModel* model) { 403 void BookmarkBarGtk::Loaded(BookmarkModel* model) {
404 // If |instructions_| has been nulled, we are in the middle of browser 404 // If |instructions_| has been nulled, we are in the middle of browser
405 // shutdown. Do nothing. 405 // shutdown. Do nothing.
(...skipping 947 matching lines...) Expand 10 before | Expand all | Expand 10 after
1353 1353
1354 // Find the GtkWidget* for the actual target button. 1354 // Find the GtkWidget* for the actual target button.
1355 int shift = dir == GTK_MENU_DIR_PARENT ? -1 : 1; 1355 int shift = dir == GTK_MENU_DIR_PARENT ? -1 : 1;
1356 button_idx = (button_idx + shift + folder_list.size()) % folder_list.size(); 1356 button_idx = (button_idx + shift + folder_list.size()) % folder_list.size();
1357 PopupForButton(folder_list[button_idx]); 1357 PopupForButton(folder_list[button_idx]);
1358 } 1358 }
1359 1359
1360 void BookmarkBarGtk::CloseMenu() { 1360 void BookmarkBarGtk::CloseMenu() {
1361 current_context_menu_->Cancel(); 1361 current_context_menu_->Cancel();
1362 } 1362 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/status/network_menu_button.cc ('k') | chrome/browser/gtk/browser_actions_toolbar_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698