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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « views/examples/native_widget_views_example.h ('k') | views/views.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/examples/native_widget_views_example.cc
===================================================================
--- views/examples/native_widget_views_example.cc (revision 0)
+++ views/examples/native_widget_views_example.cc (revision 0)
@@ -0,0 +1,35 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "views/examples/native_widget_views_example.h"
+
+#include "views/examples/example_base.h"
+#include "views/view.h"
+#include "views/widget/widget.h"
+#include "views/widget/native_widget_views.h"
+
+namespace examples {
+
+NativeWidgetViewsExample::NativeWidgetViewsExample(ExamplesMain* main)
+ : ExampleBase(main) {
+}
+
+NativeWidgetViewsExample::~NativeWidgetViewsExample() {
+}
+
+std::wstring NativeWidgetViewsExample::GetExampleTitle() {
+ return L"NativeWidgetViews";
+}
+
+void NativeWidgetViewsExample::CreateExampleView(views::View* container) {
+ views::Widget* widget = new views::Widget;
+ views::NativeWidgetViews* nwv = new views::NativeWidgetViews(widget);
+ views::Widget::InitParams params(views::Widget::InitParams::TYPE_CONTROL);
+ params.native_widget = nwv;
+ widget->Init(params);
+ container->AddChildView(nwv->GetView());
+ widget->SetBounds(gfx::Rect(10, 10, 50, 50));
+}
+
+} // namespace examples
Property changes on: views\examples\native_widget_views_example.cc
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « views/examples/native_widget_views_example.h ('k') | views/views.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698