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

Side by Side Diff: ui/views/views_delegate.cc

Issue 1390353007: Adds MUSViewsInit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix windows Created 5 years, 2 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/views_delegate.h ('k') | ui/views/widget/widget.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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #include "ui/views/views_delegate.h" 5 #include "ui/views/views_delegate.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "ui/views/views_touch_selection_controller_factory.h" 8 #include "ui/views/views_touch_selection_controller_factory.h"
9 #include "ui/views/widget/native_widget_private.h"
9 10
10 #if defined(USE_AURA) 11 #if defined(USE_AURA)
11 #include "ui/views/touchui/touch_selection_menu_runner_views.h" 12 #include "ui/views/touchui/touch_selection_menu_runner_views.h"
12 #endif 13 #endif
13 14
14 namespace views { 15 namespace views {
15 namespace { 16 namespace {
16 17
17 ViewsDelegate* views_delegate = nullptr; 18 ViewsDelegate* views_delegate = nullptr;
18 19
19 } 20 }
20 21
21 ViewsDelegate::~ViewsDelegate() { 22 ViewsDelegate::~ViewsDelegate() {
22 ui::TouchEditingControllerFactory::SetInstance(nullptr); 23 ui::TouchEditingControllerFactory::SetInstance(nullptr);
23 24
24 DCHECK_EQ(this, views_delegate); 25 DCHECK_EQ(this, views_delegate);
25 views_delegate = nullptr; 26 views_delegate = nullptr;
26 } 27 }
27 28
28 ViewsDelegate* ViewsDelegate::GetInstance() { 29 ViewsDelegate* ViewsDelegate::GetInstance() {
29 return views_delegate; 30 return views_delegate;
30 } 31 }
31 32
33 NativeWidget* ViewsDelegate::CreateNativeWidget(
34 internal::NativeWidgetDelegate* delegate) {
35 return internal::NativeWidgetPrivate::CreateNativeWidget(delegate);
36 }
37
32 void ViewsDelegate::SaveWindowPlacement(const Widget* widget, 38 void ViewsDelegate::SaveWindowPlacement(const Widget* widget,
33 const std::string& window_name, 39 const std::string& window_name,
34 const gfx::Rect& bounds, 40 const gfx::Rect& bounds,
35 ui::WindowShowState show_state) { 41 ui::WindowShowState show_state) {
36 } 42 }
37 43
38 bool ViewsDelegate::GetSavedWindowPlacement( 44 bool ViewsDelegate::GetSavedWindowPlacement(
39 const Widget* widget, 45 const Widget* widget,
40 const std::string& window_name, 46 const std::string& window_name,
41 gfx::Rect* bounds, 47 gfx::Rect* bounds,
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 views_delegate = this; 131 views_delegate = this;
126 132
127 ui::TouchEditingControllerFactory::SetInstance(views_tsc_factory_.get()); 133 ui::TouchEditingControllerFactory::SetInstance(views_tsc_factory_.get());
128 134
129 #if defined(USE_AURA) 135 #if defined(USE_AURA)
130 touch_selection_menu_runner_.reset(new TouchSelectionMenuRunnerViews()); 136 touch_selection_menu_runner_.reset(new TouchSelectionMenuRunnerViews());
131 #endif 137 #endif
132 } 138 }
133 139
134 } // namespace views 140 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/views_delegate.h ('k') | ui/views/widget/widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698