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" |
(...skipping 27 matching lines...) Expand all Loading... |
38 profile->IsOffTheRecord() ? | 38 profile->IsOffTheRecord() ? |
39 IDR_THEME_FRAME_INCOGNITO : IDR_THEME_FRAME); | 39 IDR_THEME_FRAME_INCOGNITO : IDR_THEME_FRAME); |
40 } else { | 40 } else { |
41 background = theme->GetImageSkiaNamed( | 41 background = theme->GetImageSkiaNamed( |
42 profile->IsOffTheRecord() ? | 42 profile->IsOffTheRecord() ? |
43 IDR_THEME_FRAME_INCOGNITO_INACTIVE : IDR_THEME_FRAME_INACTIVE); | 43 IDR_THEME_FRAME_INCOGNITO_INACTIVE : IDR_THEME_FRAME_INACTIVE); |
44 } | 44 } |
45 } | 45 } |
46 | 46 |
47 gfx::Point origin(0, 0); | 47 gfx::Point origin(0, 0); |
48 views::View::ConvertPointToView(view, | 48 views::View::ConvertPointToTarget(view, |
49 browser_view_->frame()->GetFrameView(), | 49 browser_view_->frame()->GetFrameView(), |
50 &origin); | 50 &origin); |
51 canvas->TileImageInt(*background, | 51 canvas->TileImageInt(*background, |
52 origin.x(), origin.y(), 0, 0, | 52 origin.x(), origin.y(), 0, 0, |
53 view->width(), view->height()); | 53 view->width(), view->height()); |
54 } | 54 } |
OLD | NEW |