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

Unified Diff: ui/views/test/test_views_delegate.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/desktop_test_views_delegate_mac.cc ('k') | ui/views/test/test_views_delegate_aura.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.cc
diff --git a/ui/views/test/test_views_delegate.cc b/ui/views/test/test_views_delegate.cc
deleted file mode 100644
index 0d437ea64e28ba23611cfd3e9de14abddadbde39..0000000000000000000000000000000000000000
--- a/ui/views/test/test_views_delegate.cc
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright (c) 2012 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/wm/core/wm_state.h"
-
-#if !defined(OS_CHROMEOS)
-#include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
-#endif // !defined(OS_CHROMEOS)
-
-
-namespace views {
-
-TestViewsDelegate::TestViewsDelegate()
- : use_desktop_native_widgets_(false),
- use_transparent_windows_(false) {
- DCHECK(!ViewsDelegate::views_delegate);
- ViewsDelegate::views_delegate = this;
-#if defined(USE_AURA)
- wm_state_.reset(new wm::WMState);
-#endif
-}
-
-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) {
- params->opacity = use_transparent_windows_ ?
- Widget::InitParams::TRANSLUCENT_WINDOW :
- Widget::InitParams::OPAQUE_WINDOW;
- }
-#if !defined(OS_CHROMEOS)
- if (!params->native_widget && use_desktop_native_widgets_)
- params->native_widget = new DesktopNativeWidgetAura(delegate);
-#endif // !defined(OS_CHROMEOS)
-}
-
-} // namespace views
« no previous file with comments | « ui/views/test/desktop_test_views_delegate_mac.cc ('k') | ui/views/test/test_views_delegate_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698