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

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

Issue 11953066: Reland 179231 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix DesktopBackgroundView leak Created 7 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
« no previous file with comments | « chrome/browser/chromeos/login/webui_login_view.h ('k') | ui/views/test/child_modal_window.cc » ('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 "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "grit/ui_resources.h" 8 #include "grit/ui_resources.h"
9 #include "ui/aura/root_window.h" 9 #include "ui/aura/root_window.h"
10 #include "ui/base/resource/resource_bundle.h" 10 #include "ui/base/resource/resource_bundle.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 61 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
62 return *rb.GetImageNamed(IDR_OAK).ToImageSkia(); 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 delete this;
71 } 72 }
72 73
73 //////////////////////////////////////////////////////////////////////////////// 74 ////////////////////////////////////////////////////////////////////////////////
74 // OakWindow, views::View overrides: 75 // OakWindow, views::View overrides:
75 76
76 void OakWindow::OnPaint(gfx::Canvas* canvas) { 77 void OakWindow::OnPaint(gfx::Canvas* canvas) {
77 canvas->DrawColor(SK_ColorWHITE); 78 canvas->DrawColor(SK_ColorWHITE);
78 canvas->FillRect(separator_rect_, kBorderColor); 79 canvas->FillRect(separator_rect_, kBorderColor);
79 } 80 }
80 81
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 // context? For now, this is OK, but if we ever use Oak outside of the ash 153 // context? For now, this is OK, but if we ever use Oak outside of the ash
153 // shell, we run into crbug.com/165759. 154 // shell, we run into crbug.com/165759.
154 internal::OakWindow::instance = 155 internal::OakWindow::instance =
155 views::Widget::CreateWindowWithContextAndBounds( 156 views::Widget::CreateWindowWithContextAndBounds(
156 new internal::OakWindow, context, gfx::Rect(10, 10, 500, 500)); 157 new internal::OakWindow, context, gfx::Rect(10, 10, 500, 500));
157 } 158 }
158 internal::OakWindow::instance->Show(); 159 internal::OakWindow::instance->Show();
159 } 160 }
160 161
161 } // namespace oak 162 } // namespace oak
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/webui_login_view.h ('k') | ui/views/test/child_modal_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698