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

Side by Side Diff: ui/views/test/test_views_delegate.h

Issue 154783002: Honor can_activate flag in ShowWindowWithState (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More review comments 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 unified diff | Download patch
« no previous file with comments | « ui/views/controls/textfield/textfield.h ('k') | ui/views/test/test_views_delegate.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 #ifndef UI_VIEWS_TEST_TEST_VIEWS_DELEGATE_H_ 5 #ifndef UI_VIEWS_TEST_TEST_VIEWS_DELEGATE_H_
6 #define UI_VIEWS_TEST_TEST_VIEWS_DELEGATE_H_ 6 #define UI_VIEWS_TEST_TEST_VIEWS_DELEGATE_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "ui/views/views_delegate.h" 9 #include "ui/views/views_delegate.h"
10 10
11 namespace wm { 11 namespace wm {
12 class WMState; 12 class WMState;
13 } 13 }
14 14
15 namespace views { 15 namespace views {
16 16
17 class TestViewsDelegate : public ViewsDelegate { 17 class TestViewsDelegate : public ViewsDelegate {
18 public: 18 public:
19 TestViewsDelegate(); 19 TestViewsDelegate();
20 virtual ~TestViewsDelegate(); 20 virtual ~TestViewsDelegate();
21 21
22 void SetUseTransparentWindows(bool transparent); 22 // If set to |true|, forces widgets that do not provide a native widget to use
23 // DesktopNativeWidgetAura instead of whatever the default native widget would
24 // be. This has no effect on ChromeOS.
25 void set_use_desktop_native_widgets(bool desktop) {
26 use_desktop_native_widgets_ = desktop;
27 }
28
29 void set_use_transparent_windows(bool transparent) {
30 use_transparent_windows_ = transparent;
31 }
23 32
24 // ViewsDelegate: 33 // ViewsDelegate:
25 virtual void OnBeforeWidgetInit( 34 virtual void OnBeforeWidgetInit(
26 Widget::InitParams* params, 35 Widget::InitParams* params,
27 internal::NativeWidgetDelegate* delegate) OVERRIDE; 36 internal::NativeWidgetDelegate* delegate) OVERRIDE;
28 37
29 private: 38 private:
39 bool use_desktop_native_widgets_;
30 bool use_transparent_windows_; 40 bool use_transparent_windows_;
31 #if defined(USE_AURA) 41 #if defined(USE_AURA)
32 scoped_ptr<wm::WMState> wm_state_; 42 scoped_ptr<wm::WMState> wm_state_;
33 #endif 43 #endif
34 44
35 DISALLOW_COPY_AND_ASSIGN(TestViewsDelegate); 45 DISALLOW_COPY_AND_ASSIGN(TestViewsDelegate);
36 }; 46 };
37 47
38 } // namespace views 48 } // namespace views
39 49
40 #endif // UI_VIEWS_TEST_TEST_VIEWS_DELEGATE_H_ 50 #endif // UI_VIEWS_TEST_TEST_VIEWS_DELEGATE_H_
OLDNEW
« no previous file with comments | « ui/views/controls/textfield/textfield.h ('k') | ui/views/test/test_views_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698