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

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
« no previous file with comments | « ui/oak/oak_window.h ('k') | ui/views/bubble/bubble_border.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
8 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
9 #include "grit/ui_resources.h" 8 #include "grit/ui_resources.h"
10 #include "ui/aura/root_window.h" 9 #include "ui/aura/root_window.h"
11 #include "ui/base/resource/resource_bundle.h" 10 #include "ui/base/resource/resource_bundle.h"
12 #include "ui/gfx/canvas.h" 11 #include "ui/gfx/canvas.h"
13 #include "ui/gfx/image/image.h" 12 #include "ui/gfx/image/image.h"
13 #include "ui/oak/oak.h"
14 #include "ui/oak/oak_aura_window_display.h" 14 #include "ui/oak/oak_aura_window_display.h"
15 #include "ui/views/controls/table/table_view.h" 15 #include "ui/views/controls/table/table_view.h"
16 #include "ui/views/controls/tree/tree_view.h" 16 #include "ui/views/controls/tree/tree_view.h"
17 #include "ui/views/layout/layout_constants.h" 17 #include "ui/views/layout/layout_constants.h"
18 #include "ui/views/widget/widget.h" 18 #include "ui/views/widget/widget.h"
19 19
20 namespace oak { 20 namespace oak {
21 namespace internal { 21 namespace internal {
22 namespace { 22 namespace {
23 const SkColor kBorderColor = SkColorSetRGB(0xCC, 0xCC, 0xCC); 23 const SkColor kBorderColor = SkColorSetRGB(0xCC, 0xCC, 0xCC);
(...skipping 26 matching lines...) Expand all
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
« no previous file with comments | « ui/oak/oak_window.h ('k') | ui/views/bubble/bubble_border.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698