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

Unified Diff: ui/views/test/test_views_delegate_mac.cc

Issue 303543004: MacViews: views_examples_with_content_exe working! Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add files Created 6 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 | « ui/views/test/test_views_delegate_aura.cc ('k') | ui/views/view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/test/test_views_delegate_mac.cc
diff --git a/ui/views/test/test_views_delegate_mac.cc b/ui/views/test/test_views_delegate_mac.cc
new file mode 100644
index 0000000000000000000000000000000000000000..06fe059a67b3d26b1f92b12cd0a31744e2ed7053
--- /dev/null
+++ b/ui/views/test/test_views_delegate_mac.cc
@@ -0,0 +1,35 @@
+// Copyright 2014 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 "ui/views/test/test_views_delegate.h"
+
+#include "ui/views/widget/native_widget_mac.h"
+
+namespace views {
+
+TestViewsDelegate::TestViewsDelegate()
+ : use_desktop_native_widgets_(false),
+ use_transparent_windows_(false) {
+ DCHECK(!ViewsDelegate::views_delegate);
+ ViewsDelegate::views_delegate = this;
+}
+
+TestViewsDelegate::~TestViewsDelegate() {
+ if (ViewsDelegate::views_delegate == this)
+ ViewsDelegate::views_delegate = NULL;
+}
+
+void TestViewsDelegate::OnBeforeWidgetInit(
+ Widget::InitParams* params,
+ internal::NativeWidgetDelegate* delegate) {
+ if (params->opacity == Widget::InitParams::INFER_OPACITY)
+ NOTIMPLEMENTED();
+
+ if (!params->native_widget && use_desktop_native_widgets_) {
+ NOTIMPLEMENTED();
+ params->native_widget = new NativeWidgetMac(delegate);
+ }
+}
+
+} // namespace views
« no previous file with comments | « ui/views/test/test_views_delegate_aura.cc ('k') | ui/views/view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698