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/views/frame/browser_view.h" | 5 #include "chrome/browser/ui/views/frame/browser_view.h" |
6 | 6 |
7 #if defined(TOOLKIT_USES_GTK) | 7 #if defined(TOOLKIT_USES_GTK) |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
752 void BrowserView::UpdateDevTools() { | 752 void BrowserView::UpdateDevTools() { |
753 UpdateDevToolsForContents(GetSelectedTabContentsWrapper()); | 753 UpdateDevToolsForContents(GetSelectedTabContentsWrapper()); |
754 Layout(); | 754 Layout(); |
755 } | 755 } |
756 | 756 |
757 void BrowserView::UpdateLoadingAnimations(bool should_animate) { | 757 void BrowserView::UpdateLoadingAnimations(bool should_animate) { |
758 if (should_animate) { | 758 if (should_animate) { |
759 if (!loading_animation_timer_.IsRunning()) { | 759 if (!loading_animation_timer_.IsRunning()) { |
760 // Loads are happening, and the timer isn't running, so start it. | 760 // Loads are happening, and the timer isn't running, so start it. |
761 last_animation_time_ = base::TimeTicks::Now(); | 761 last_animation_time_ = base::TimeTicks::Now(); |
762 loading_animation_timer_.Start(FROM_HERE, | 762 loading_animation_timer_.Start( |
763 TimeDelta::FromMilliseconds(kLoadingAnimationFrameTimeMs), this, | 763 TimeDelta::FromMilliseconds(kLoadingAnimationFrameTimeMs), this, |
764 &BrowserView::LoadingAnimationCallback); | 764 &BrowserView::LoadingAnimationCallback); |
765 } | 765 } |
766 } else { | 766 } else { |
767 if (loading_animation_timer_.IsRunning()) { | 767 if (loading_animation_timer_.IsRunning()) { |
768 last_animation_time_ = base::TimeTicks(); | 768 last_animation_time_ = base::TimeTicks(); |
769 loading_animation_timer_.Stop(); | 769 loading_animation_timer_.Stop(); |
770 // Loads are now complete, update the state if a task was scheduled. | 770 // Loads are now complete, update the state if a task was scheduled. |
771 LoadingAnimationCallback(); | 771 LoadingAnimationCallback(); |
772 } | 772 } |
(...skipping 1901 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2674 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { | 2674 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { |
2675 // Create the view and the frame. The frame will attach itself via the view | 2675 // Create the view and the frame. The frame will attach itself via the view |
2676 // so we don't need to do anything with the pointer. | 2676 // so we don't need to do anything with the pointer. |
2677 BrowserView* view = new BrowserView(browser); | 2677 BrowserView* view = new BrowserView(browser); |
2678 (new BrowserFrame(view))->InitBrowserFrame(); | 2678 (new BrowserFrame(view))->InitBrowserFrame(); |
2679 view->GetWidget()->non_client_view()->SetAccessibleName( | 2679 view->GetWidget()->non_client_view()->SetAccessibleName( |
2680 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); | 2680 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); |
2681 return view; | 2681 return view; |
2682 } | 2682 } |
2683 #endif | 2683 #endif |
OLD | NEW |