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

Unified Diff: chrome/browser/ui/views/theme_background.cc

Issue 13420002: views: Remove unused theme_background.* files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/theme_background.h ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/theme_background.cc
diff --git a/chrome/browser/ui/views/theme_background.cc b/chrome/browser/ui/views/theme_background.cc
deleted file mode 100644
index 67e67269fe5a2bbbf1ff749076c710d272109ac6..0000000000000000000000000000000000000000
--- a/chrome/browser/ui/views/theme_background.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/ui/views/theme_background.h"
-
-#include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/themes/theme_service.h"
-#include "chrome/browser/themes/theme_service_factory.h"
-#include "chrome/browser/ui/browser.h"
-#include "chrome/browser/ui/views/frame/browser_view.h"
-#include "chrome/browser/ui/views/theme_image_mapper.h"
-#include "grit/generated_resources.h"
-#include "grit/theme_resources.h"
-#include "grit/ui_resources.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/gfx/canvas.h"
-#include "ui/views/view.h"
-
-ThemeBackground::ThemeBackground(BrowserView* browser_view)
- : browser_view_(browser_view) {
-}
-
-void ThemeBackground::Paint(gfx::Canvas* canvas, views::View* view) const {
- gfx::ImageSkia* background;
-
- if (!browser_view_->IsBrowserTypeNormal()) {
- // Never theme app and popup windows.
- ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
- if (browser_view_->IsActive())
- background = rb.GetImageSkiaNamed(IDR_FRAME);
- else
- background = rb.GetImageSkiaNamed(IDR_THEME_FRAME_INACTIVE);
- } else {
- Profile* profile = browser_view_->browser()->profile();
- ui::ThemeProvider* theme = view->GetThemeProvider();
- DCHECK(theme); // Should be parented to a Widget when painting.
-
- if (browser_view_->IsActive()) {
- background = theme->GetImageSkiaNamed(
- profile->IsOffTheRecord() ?
- IDR_THEME_FRAME_INCOGNITO : IDR_THEME_FRAME);
- } else {
- background = theme->GetImageSkiaNamed(
- profile->IsOffTheRecord() ?
- IDR_THEME_FRAME_INCOGNITO_INACTIVE : IDR_THEME_FRAME_INACTIVE);
- }
- }
-
- gfx::Point origin;
- views::View::ConvertPointToTarget(view,
- browser_view_->frame()->GetFrameView(),
- &origin);
- canvas->TileImageInt(*background,
- origin.x(), origin.y(), 0, 0,
- view->width(), view->height());
-}
« no previous file with comments | « chrome/browser/ui/views/theme_background.h ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698