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

Side by Side Diff: views/examples/native_widget_views_example.cc

Issue 6990048: Add NativeWidgetViews. This is a stub implementation that mostly just defers to its parent Native... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 7 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
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "views/examples/native_widget_views_example.h"
6
7 #include "views/examples/example_base.h"
8 #include "views/view.h"
9 #include "views/widget/widget.h"
10 #include "views/widget/native_widget_views.h"
11
12 namespace examples {
13
14 NativeWidgetViewsExample::NativeWidgetViewsExample(ExamplesMain* main)
15 : ExampleBase(main) {
16 }
17
18 NativeWidgetViewsExample::~NativeWidgetViewsExample() {
19 }
20
21 std::wstring NativeWidgetViewsExample::GetExampleTitle() {
22 return L"NativeWidgetViews";
23 }
24
25 void NativeWidgetViewsExample::CreateExampleView(views::View* container) {
26 views::Widget* widget = new views::Widget;
27 views::NativeWidgetViews* nwv = new views::NativeWidgetViews(widget);
28 views::Widget::InitParams params(views::Widget::InitParams::TYPE_CONTROL);
29 params.native_widget = nwv;
30 widget->Init(params);
31 container->AddChildView(nwv->GetView());
32 widget->SetBounds(gfx::Rect(10, 10, 50, 50));
33 }
34
35 } // namespace examples
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698