| 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/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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |