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

Side by Side Diff: chrome/browser/chromeos/views/copy_background.cc

Issue 6312156: Change includes of gfx/* to ui/gfx/* (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 10 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/chromeos/views/copy_background.h" 5 #include "chrome/browser/chromeos/views/copy_background.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "gfx/canvas.h" 8 #include "ui/gfx/canvas.h"
9 #include "views/background.h" 9 #include "views/background.h"
10 #include "views/view.h" 10 #include "views/view.h"
11 11
12 namespace chromeos { 12 namespace chromeos {
13 13
14 CopyBackground::CopyBackground(views::View* copy_from) 14 CopyBackground::CopyBackground(views::View* copy_from)
15 : background_owner_(copy_from) { 15 : background_owner_(copy_from) {
16 DCHECK(background_owner_); 16 DCHECK(background_owner_);
17 DCHECK(background_owner_->background()); 17 DCHECK(background_owner_->background());
18 } 18 }
19 19
20 void CopyBackground::Paint(gfx::Canvas* canvas, views::View* view) const { 20 void CopyBackground::Paint(gfx::Canvas* canvas, views::View* view) const {
21 const Background* background = background_owner_->background(); 21 const Background* background = background_owner_->background();
22 DCHECK(background); 22 DCHECK(background);
23 gfx::Point origin(0, 0); 23 gfx::Point origin(0, 0);
24 views::View::ConvertPointToView(view, 24 views::View::ConvertPointToView(view,
25 background_owner_, 25 background_owner_,
26 &origin); 26 &origin);
27 canvas->Save(); 27 canvas->Save();
28 // Move the origin and paint as if it's paint onto the owner. 28 // Move the origin and paint as if it's paint onto the owner.
29 canvas->TranslateInt(-origin.x(), -origin.y()); 29 canvas->TranslateInt(-origin.x(), -origin.y());
30 background->Paint(canvas, background_owner_); 30 background->Paint(canvas, background_owner_);
31 canvas->Restore(); 31 canvas->Restore();
32 } 32 }
33 33
34 } // namespace chromeos 34 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/status/window_switcher_button.cc ('k') | chrome/browser/chromeos/views/domui_menu_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698