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

Side by Side Diff: ui/oak/oak_window.cc

Issue 10447053: Converts remainder of ui and chrome/browser/ui/views/frame to use ImageSkia (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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) 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 "ui/oak/oak_window.h" 5 #include "ui/oak/oak_window.h"
6 6
7 #include "ui/oak/oak.h" 7 #include "ui/oak/oak.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "grit/ui_resources.h" 9 #include "grit/ui_resources.h"
10 #include "ui/aura/root_window.h" 10 #include "ui/aura/root_window.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 } 50 }
51 51
52 string16 OakWindow::GetWindowTitle() const { 52 string16 OakWindow::GetWindowTitle() const {
53 return ASCIIToUTF16("Oak"); 53 return ASCIIToUTF16("Oak");
54 } 54 }
55 55
56 views::View* OakWindow::GetContentsView() { 56 views::View* OakWindow::GetContentsView() {
57 return this; 57 return this;
58 } 58 }
59 59
60 SkBitmap OakWindow::GetWindowIcon() { 60 gfx::ImageSkia OakWindow::GetWindowIcon() {
61 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 61 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
62 return *rb.GetImageNamed(IDR_OAK).ToSkBitmap(); 62 return *rb.GetImageNamed(IDR_OAK).ToImageSkia();
63 } 63 }
64 64
65 bool OakWindow::ShouldShowWindowIcon() const { 65 bool OakWindow::ShouldShowWindowIcon() const {
66 return true; 66 return true;
67 } 67 }
68 68
69 void OakWindow::DeleteDelegate() { 69 void OakWindow::DeleteDelegate() {
70 instance = NULL; 70 instance = NULL;
71 } 71 }
72 72
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 void ShowOakWindow() { 149 void ShowOakWindow() {
150 if (!internal::OakWindow::instance) { 150 if (!internal::OakWindow::instance) {
151 internal::OakWindow::instance = 151 internal::OakWindow::instance =
152 views::Widget::CreateWindowWithBounds(new internal::OakWindow, 152 views::Widget::CreateWindowWithBounds(new internal::OakWindow,
153 gfx::Rect(10, 10, 500, 500)); 153 gfx::Rect(10, 10, 500, 500));
154 } 154 }
155 internal::OakWindow::instance->Show(); 155 internal::OakWindow::instance->Show();
156 } 156 }
157 157
158 } // namespace oak 158 } // namespace oak
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698