| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ash/browser_non_client_frame_view_ash.h" | 5 #include "chrome/browser/ui/views/ash/browser_non_client_frame_view_ash.h" |
| 6 | 6 |
| 7 #include "ash/wm/frame_painter.h" | 7 #include "ash/wm/frame_painter.h" |
| 8 #include "ash/wm/workspace/frame_maximize_button.h" | 8 #include "ash/wm/workspace/frame_maximize_button.h" |
| 9 #include "chrome/browser/themes/theme_service.h" | 9 #include "chrome/browser/themes/theme_service.h" |
| 10 #include "chrome/browser/ui/views/avatar_menu_button.h" | 10 #include "chrome/browser/ui/views/avatar_menu_button.h" |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 } | 330 } |
| 331 } | 331 } |
| 332 | 332 |
| 333 /////////////////////////////////////////////////////////////////////////////// | 333 /////////////////////////////////////////////////////////////////////////////// |
| 334 // TabIconView::TabIconViewModel overrides: | 334 // TabIconView::TabIconViewModel overrides: |
| 335 | 335 |
| 336 bool BrowserNonClientFrameViewAsh::ShouldTabIconViewAnimate() const { | 336 bool BrowserNonClientFrameViewAsh::ShouldTabIconViewAnimate() const { |
| 337 // This function is queried during the creation of the window as the | 337 // This function is queried during the creation of the window as the |
| 338 // TabIconView we host is initialized, so we need to NULL check the selected | 338 // TabIconView we host is initialized, so we need to NULL check the selected |
| 339 // WebContents because in this condition there is not yet a selected tab. | 339 // WebContents because in this condition there is not yet a selected tab. |
| 340 content::WebContents* current_tab = browser_view()->GetSelectedWebContents(); | 340 content::WebContents* current_tab = browser_view()->GetActiveWebContents(); |
| 341 return current_tab ? current_tab->IsLoading() : false; | 341 return current_tab ? current_tab->IsLoading() : false; |
| 342 } | 342 } |
| 343 | 343 |
| 344 gfx::ImageSkia BrowserNonClientFrameViewAsh::GetFaviconForTabIconView() { | 344 gfx::ImageSkia BrowserNonClientFrameViewAsh::GetFaviconForTabIconView() { |
| 345 views::WidgetDelegate* delegate = frame()->widget_delegate(); | 345 views::WidgetDelegate* delegate = frame()->widget_delegate(); |
| 346 if (!delegate) | 346 if (!delegate) |
| 347 return gfx::ImageSkia(); | 347 return gfx::ImageSkia(); |
| 348 return delegate->GetWindowIcon(); | 348 return delegate->GetWindowIcon(); |
| 349 } | 349 } |
| 350 | 350 |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 513 BrowserNonClientFrameViewAsh::GetThemeFrameOverlayImage() const { | 513 BrowserNonClientFrameViewAsh::GetThemeFrameOverlayImage() const { |
| 514 ui::ThemeProvider* tp = GetThemeProvider(); | 514 ui::ThemeProvider* tp = GetThemeProvider(); |
| 515 if (tp->HasCustomImage(IDR_THEME_FRAME_OVERLAY) && | 515 if (tp->HasCustomImage(IDR_THEME_FRAME_OVERLAY) && |
| 516 browser_view()->IsBrowserTypeNormal() && | 516 browser_view()->IsBrowserTypeNormal() && |
| 517 !browser_view()->IsOffTheRecord()) { | 517 !browser_view()->IsOffTheRecord()) { |
| 518 return tp->GetImageSkiaNamed(ShouldPaintAsActive() ? | 518 return tp->GetImageSkiaNamed(ShouldPaintAsActive() ? |
| 519 IDR_THEME_FRAME_OVERLAY : IDR_THEME_FRAME_OVERLAY_INACTIVE); | 519 IDR_THEME_FRAME_OVERLAY : IDR_THEME_FRAME_OVERLAY_INACTIVE); |
| 520 } | 520 } |
| 521 return NULL; | 521 return NULL; |
| 522 } | 522 } |
| OLD | NEW |