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

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

Issue 11801027: More work to make ash_unittests pass when we require context. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix TableViewTest by making it a ViewsTestBase. Created 7 years, 11 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.h ('k') | ui/views/controls/table/table_view_unittest.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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 details_->set_owned_by_client(); 139 details_->set_owned_by_client();
140 details_container_ = details_->CreateParentIfNecessary(); 140 details_container_ = details_->CreateParentIfNecessary();
141 details_->SetModel(details_model_.get()); 141 details_->SetModel(details_model_.get());
142 AddChildView(details_container_); 142 AddChildView(details_container_);
143 143
144 OnTreeViewSelectionChanged(tree_.get()); 144 OnTreeViewSelectionChanged(tree_.get());
145 } 145 }
146 146
147 } // namespace internal 147 } // namespace internal
148 148
149 void ShowOakWindow() { 149 void ShowOakWindowWithContext(gfx::NativeView context) {
150 if (!internal::OakWindow::instance) { 150 if (!internal::OakWindow::instance) {
151 // TODO(erg): Do we want to reuse this window in times with a different
152 // context? For now, this is OK, but if we ever use Oak outside of the ash
153 // shell, we run into crbug.com/165759.
151 internal::OakWindow::instance = 154 internal::OakWindow::instance =
152 views::Widget::CreateWindowWithBounds(new internal::OakWindow, 155 views::Widget::CreateWindowWithContextAndBounds(
153 gfx::Rect(10, 10, 500, 500)); 156 new internal::OakWindow, context, gfx::Rect(10, 10, 500, 500));
154 } 157 }
155 internal::OakWindow::instance->Show(); 158 internal::OakWindow::instance->Show();
156 } 159 }
157 160
158 } // namespace oak 161 } // namespace oak
OLDNEW
« no previous file with comments | « ui/oak/oak.h ('k') | ui/views/controls/table/table_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698