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/gtk/bookmarks/bookmark_bar_gtk.h" | 5 #include "chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
479 | 479 |
480 SetChevronState(); | 480 SetChevronState(); |
481 } | 481 } |
482 | 482 |
483 void BookmarkBarGtk::Hide(BookmarkBar::State old_state, | 483 void BookmarkBarGtk::Hide(BookmarkBar::State old_state, |
484 BookmarkBar::AnimateChangeType animate_type) { | 484 BookmarkBar::AnimateChangeType animate_type) { |
485 UpdateDetachedState(old_state); | 485 UpdateDetachedState(old_state); |
486 | 486 |
487 // After coming out of fullscreen, the browser window sets the bookmark bar | 487 // After coming out of fullscreen, the browser window sets the bookmark bar |
488 // to the "hidden" state, which means we need to show our minimum height. | 488 // to the "hidden" state, which means we need to show our minimum height. |
489 gtk_widget_show(widget()); | 489 if (!window_->IsFullscreen()) |
| 490 gtk_widget_show(widget()); |
490 CalculateMaxHeight(); | 491 CalculateMaxHeight(); |
491 // Sometimes we get called without a matching call to open. If that happens | 492 // Sometimes we get called without a matching call to open. If that happens |
492 // then force hide. | 493 // then force hide. |
493 if (slide_animation_.IsShowing() && | 494 if (slide_animation_.IsShowing() && |
494 animate_type == BookmarkBar::ANIMATE_STATE_CHANGE) { | 495 animate_type == BookmarkBar::ANIMATE_STATE_CHANGE) { |
495 slide_animation_.Hide(); | 496 slide_animation_.Hide(); |
496 } else { | 497 } else { |
497 gtk_widget_hide(bookmark_hbox_); | 498 gtk_widget_hide(bookmark_hbox_); |
498 slide_animation_.Reset(0); | 499 slide_animation_.Reset(0); |
499 AnimationProgressed(&slide_animation_); | 500 AnimationProgressed(&slide_animation_); |
(...skipping 973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1473 void BookmarkBarGtk::OnEditBookmarksEnabledChanged() { | 1474 void BookmarkBarGtk::OnEditBookmarksEnabledChanged() { |
1474 GtkDestDefaults dest_defaults = | 1475 GtkDestDefaults dest_defaults = |
1475 *edit_bookmarks_enabled_ ? GTK_DEST_DEFAULT_ALL : | 1476 *edit_bookmarks_enabled_ ? GTK_DEST_DEFAULT_ALL : |
1476 GTK_DEST_DEFAULT_DROP; | 1477 GTK_DEST_DEFAULT_DROP; |
1477 gtk_drag_dest_set(overflow_button_, dest_defaults, NULL, 0, kDragAction); | 1478 gtk_drag_dest_set(overflow_button_, dest_defaults, NULL, 0, kDragAction); |
1478 gtk_drag_dest_set(other_bookmarks_button_, dest_defaults, | 1479 gtk_drag_dest_set(other_bookmarks_button_, dest_defaults, |
1479 NULL, 0, kDragAction); | 1480 NULL, 0, kDragAction); |
1480 ui::SetDestTargetList(overflow_button_, kDestTargetList); | 1481 ui::SetDestTargetList(overflow_button_, kDestTargetList); |
1481 ui::SetDestTargetList(other_bookmarks_button_, kDestTargetList); | 1482 ui::SetDestTargetList(other_bookmarks_button_, kDestTargetList); |
1482 } | 1483 } |
OLD | NEW |