Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(314)

Side by Side Diff: chrome/browser/ui/views/ash/browser_non_client_frame_view_ash.cc

Issue 10447053: Converts remainder of ui and chrome/browser/ui/views/frame to use ImageSkia (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
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()->GetSelectedWebContents();
341 return current_tab ? current_tab->IsLoading() : false; 341 return current_tab ? current_tab->IsLoading() : false;
342 } 342 }
343 343
344 SkBitmap 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 SkBitmap(); 347 return SkBitmap();
348 return delegate->GetWindowIcon(); 348 return delegate->GetWindowIcon();
349 } 349 }
350 350
351 /////////////////////////////////////////////////////////////////////////////// 351 ///////////////////////////////////////////////////////////////////////////////
352 // BrowserNonClientFrameViewAsh, private: 352 // BrowserNonClientFrameViewAsh, private:
353 353
354 354
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 BrowserNonClientFrameViewAsh::GetThemeFrameOverlayBitmap() const { 512 BrowserNonClientFrameViewAsh::GetThemeFrameOverlayBitmap() const {
513 ui::ThemeProvider* tp = GetThemeProvider(); 513 ui::ThemeProvider* tp = GetThemeProvider();
514 if (tp->HasCustomImage(IDR_THEME_FRAME_OVERLAY) && 514 if (tp->HasCustomImage(IDR_THEME_FRAME_OVERLAY) &&
515 browser_view()->IsBrowserTypeNormal() && 515 browser_view()->IsBrowserTypeNormal() &&
516 !browser_view()->IsOffTheRecord()) { 516 !browser_view()->IsOffTheRecord()) {
517 return tp->GetBitmapNamed(ShouldPaintAsActive() ? 517 return tp->GetBitmapNamed(ShouldPaintAsActive() ?
518 IDR_THEME_FRAME_OVERLAY : IDR_THEME_FRAME_OVERLAY_INACTIVE); 518 IDR_THEME_FRAME_OVERLAY : IDR_THEME_FRAME_OVERLAY_INACTIVE);
519 } 519 }
520 return NULL; 520 return NULL;
521 } 521 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698