OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/tab_contents/tab_contents.h" | 5 #include "chrome/browser/tab_contents/tab_contents.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 "base/file_version_info.h" | 9 #include "base/file_version_info.h" |
10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
920 | 920 |
921 void TabContents::SetDownloadShelfVisible(bool visible) { | 921 void TabContents::SetDownloadShelfVisible(bool visible) { |
922 if (shelf_visible_ != visible) { | 922 if (shelf_visible_ != visible) { |
923 if (visible) { | 923 if (visible) { |
924 // Invoke GetDownloadShelf to force the shelf to be created. | 924 // Invoke GetDownloadShelf to force the shelf to be created. |
925 GetDownloadShelf(true); | 925 GetDownloadShelf(true); |
926 } | 926 } |
927 shelf_visible_ = visible; | 927 shelf_visible_ = visible; |
928 | 928 |
929 NotifyNavigationStateChanged(INVALIDATE_TAB); | 929 NotifyNavigationStateChanged(INVALIDATE_TAB); |
| 930 |
| 931 if (delegate()) |
| 932 delegate()->UpdateDownloadShelfVisibility(visible); |
930 } | 933 } |
931 | 934 |
932 // SetShelfVisible can force-close the shelf, so make sure we lay out | 935 // SetShelfVisible can force-close the shelf, so make sure we lay out |
933 // everything correctly, as if the animation had finished. This doesn't | 936 // everything correctly, as if the animation had finished. This doesn't |
934 // matter for showing the shelf, as the show animation will do it. | 937 // matter for showing the shelf, as the show animation will do it. |
935 ToolbarSizeChanged(false); | 938 ToolbarSizeChanged(false); |
936 | 939 |
937 if (visible) { | 940 if (visible) { |
938 // Always set this value as it reflects the last time the download shelf | 941 // Always set this value as it reflects the last time the download shelf |
939 // was made visible (even if it was already visible). | 942 // was made visible (even if it was already visible). |
(...skipping 1498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2438 NavigationController::LoadCommittedDetails& committed_details = | 2441 NavigationController::LoadCommittedDetails& committed_details = |
2439 *(Details<NavigationController::LoadCommittedDetails>(details).ptr()); | 2442 *(Details<NavigationController::LoadCommittedDetails>(details).ptr()); |
2440 ExpireInfoBars(committed_details); | 2443 ExpireInfoBars(committed_details); |
2441 break; | 2444 break; |
2442 } | 2445 } |
2443 | 2446 |
2444 default: | 2447 default: |
2445 NOTREACHED(); | 2448 NOTREACHED(); |
2446 } | 2449 } |
2447 } | 2450 } |
OLD | NEW |