| 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 743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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( | 762 loading_animation_timer_.Start( |
| 763 TimeDelta::FromMilliseconds(kLoadingAnimationFrameTimeMs), this, | 763 TimeDelta::FromMilliseconds(kLoadingAnimationFrameTimeMs), this, |
| 764 &BrowserView::LoadingAnimationCallback); | 764 &BrowserView::LoadingAnimationCallback, FROM_HERE); |
| 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 } |
| 773 } | 773 } |
| 774 } | 774 } |
| (...skipping 1909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2684 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { | 2684 BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) { |
| 2685 // Create the view and the frame. The frame will attach itself via the view | 2685 // Create the view and the frame. The frame will attach itself via the view |
| 2686 // so we don't need to do anything with the pointer. | 2686 // so we don't need to do anything with the pointer. |
| 2687 BrowserView* view = new BrowserView(browser); | 2687 BrowserView* view = new BrowserView(browser); |
| 2688 (new BrowserFrame(view))->InitBrowserFrame(); | 2688 (new BrowserFrame(view))->InitBrowserFrame(); |
| 2689 view->GetWidget()->non_client_view()->SetAccessibleName( | 2689 view->GetWidget()->non_client_view()->SetAccessibleName( |
| 2690 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); | 2690 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); |
| 2691 return view; | 2691 return view; |
| 2692 } | 2692 } |
| 2693 #endif | 2693 #endif |
| OLD | NEW |