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

Side by Side Diff: chrome/browser/chromeos/status_area_button.cc

Issue 341044: Move chromeos code to namespace chromeos. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 1 month 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/status_area_button.h" 5 #include "chrome/browser/chromeos/status_area_button.h"
6 6
7 #include "app/gfx/canvas.h" 7 #include "app/gfx/canvas.h"
8 #include "app/gfx/skbitmap_operations.h" 8 #include "app/gfx/skbitmap_operations.h"
9 #include "app/resource_bundle.h" 9 #include "app/resource_bundle.h"
10 #include "grit/theme_resources.h" 10 #include "grit/theme_resources.h"
11 #include "views/border.h" 11 #include "views/border.h"
12 #include "views/view.h" 12 #include "views/view.h"
13 13
14 namespace chromeos {
15
14 //////////////////////////////////////////////////////////////////////////////// 16 ////////////////////////////////////////////////////////////////////////////////
15 // StatusAreaButton 17 // StatusAreaButton
16 18
17 StatusAreaButton::StatusAreaButton(views::ViewMenuDelegate* menu_delegate) 19 StatusAreaButton::StatusAreaButton(views::ViewMenuDelegate* menu_delegate)
18 : MenuButton(NULL, std::wstring(), menu_delegate, false) { 20 : MenuButton(NULL, std::wstring(), menu_delegate, false) {
19 set_border(NULL); 21 set_border(NULL);
20 SetShowHighlighted(true); 22 SetShowHighlighted(true);
21 } 23 }
22 24
23 void StatusAreaButton::Paint(gfx::Canvas* canvas, bool for_drag) { 25 void StatusAreaButton::Paint(gfx::Canvas* canvas, bool for_drag) {
(...skipping 15 matching lines...) Expand all
39 } 41 }
40 SkBitmap* container = 42 SkBitmap* container =
41 ResourceBundle::GetSharedInstance().GetBitmapNamed(bitmap_id); 43 ResourceBundle::GetSharedInstance().GetBitmapNamed(bitmap_id);
42 canvas->DrawBitmapInt(*container, 0, 0); 44 canvas->DrawBitmapInt(*container, 0, 0);
43 DrawIcon(canvas); 45 DrawIcon(canvas);
44 } 46 }
45 47
46 void StatusAreaButton::DrawIcon(gfx::Canvas* canvas) { 48 void StatusAreaButton::DrawIcon(gfx::Canvas* canvas) {
47 canvas->DrawBitmapInt(icon(), 0, 0); 49 canvas->DrawBitmapInt(icon(), 0, 0);
48 } 50 }
51
52 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698