| 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/theme_background.h" | 5 #include "chrome/browser/ui/views/theme_background.h" |
| 6 | 6 |
| 7 #include "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
| 8 #include "chrome/browser/themes/theme_service.h" | 8 #include "chrome/browser/themes/theme_service.h" |
| 9 #include "chrome/browser/themes/theme_service_factory.h" | 9 #include "chrome/browser/themes/theme_service_factory.h" |
| 10 #include "chrome/browser/ui/views/frame/browser_view.h" | 10 #include "chrome/browser/ui/views/frame/browser_view.h" |
| 11 #include "grit/generated_resources.h" | 11 #include "grit/generated_resources.h" |
| 12 #include "grit/theme_resources.h" | 12 #include "grit/theme_resources.h" |
| 13 #include "grit/theme_resources_standard.h" | |
| 14 #include "grit/ui_resources.h" | 13 #include "grit/ui_resources.h" |
| 15 #include "ui/base/resource/resource_bundle.h" | 14 #include "ui/base/resource/resource_bundle.h" |
| 16 #include "ui/gfx/canvas.h" | 15 #include "ui/gfx/canvas.h" |
| 17 #include "ui/views/view.h" | 16 #include "ui/views/view.h" |
| 18 | 17 |
| 19 ThemeBackground::ThemeBackground(BrowserView* browser_view) | 18 ThemeBackground::ThemeBackground(BrowserView* browser_view) |
| 20 : browser_view_(browser_view) { | 19 : browser_view_(browser_view) { |
| 21 } | 20 } |
| 22 | 21 |
| 23 void ThemeBackground::Paint(gfx::Canvas* canvas, views::View* view) const { | 22 void ThemeBackground::Paint(gfx::Canvas* canvas, views::View* view) const { |
| (...skipping 22 matching lines...) Expand all Loading... |
| 46 } | 45 } |
| 47 | 46 |
| 48 gfx::Point origin(0, 0); | 47 gfx::Point origin(0, 0); |
| 49 views::View::ConvertPointToView(view, | 48 views::View::ConvertPointToView(view, |
| 50 browser_view_->frame()->GetFrameView(), | 49 browser_view_->frame()->GetFrameView(), |
| 51 &origin); | 50 &origin); |
| 52 canvas->TileImageInt(*background, | 51 canvas->TileImageInt(*background, |
| 53 origin.x(), origin.y(), 0, 0, | 52 origin.x(), origin.y(), 0, 0, |
| 54 view->width(), view->height()); | 53 view->width(), view->height()); |
| 55 } | 54 } |
| OLD | NEW |