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

Side by Side Diff: views/widget/widget.cc

Issue 8240006: Use a mocked compositor for unit tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge Created 9 years, 1 month 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 | Annotate | Revision Log
« ui/gfx/compositor/compositor.gyp ('K') | « views/widget/widget.h ('k') | no next file » | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "views/widget/widget.h" 5 #include "views/widget/widget.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "ui/base/l10n/l10n_font_util.h" 10 #include "ui/base/l10n/l10n_font_util.h"
(...skipping 1082 matching lines...) Expand 10 before | Expand all | Expand 10 after
1093 // hierarchy references this focus manager, it crashes. This will defer focus 1093 // hierarchy references this focus manager, it crashes. This will defer focus
1094 // manager's destruction after child NativeWidgetGtk's dtor. 1094 // manager's destruction after child NativeWidgetGtk's dtor.
1095 FocusManager* focus_manager = focus_manager_.release(); 1095 FocusManager* focus_manager = focus_manager_.release();
1096 if (focus_manager) 1096 if (focus_manager)
1097 MessageLoop::current()->DeleteSoon(FROM_HERE, focus_manager); 1097 MessageLoop::current()->DeleteSoon(FROM_HERE, focus_manager);
1098 } 1098 }
1099 1099
1100 //////////////////////////////////////////////////////////////////////////////// 1100 ////////////////////////////////////////////////////////////////////////////////
1101 // Widget, private: 1101 // Widget, private:
1102 1102
1103 // static
1104 ui::Compositor*(*Widget::compositor_factory_)() = NULL;
1105
1106 bool Widget::ShouldReleaseCaptureOnMouseReleased() const { 1103 bool Widget::ShouldReleaseCaptureOnMouseReleased() const {
1107 return true; 1104 return true;
1108 } 1105 }
1109 1106
1110 void Widget::SaveWindowPlacement() { 1107 void Widget::SaveWindowPlacement() {
1111 // The window delegate does the actual saving for us. It seems like (judging 1108 // The window delegate does the actual saving for us. It seems like (judging
1112 // by go/crash) that in some circumstances we can end up here after 1109 // by go/crash) that in some circumstances we can end up here after
1113 // WM_DESTROY, at which point the window delegate is likely gone. So just 1110 // WM_DESTROY, at which point the window delegate is likely gone. So just
1114 // bail. 1111 // bail.
1115 if (!widget_delegate_) 1112 if (!widget_delegate_)
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
1187 1184
1188 //////////////////////////////////////////////////////////////////////////////// 1185 ////////////////////////////////////////////////////////////////////////////////
1189 // internal::NativeWidgetPrivate, NativeWidget implementation: 1186 // internal::NativeWidgetPrivate, NativeWidget implementation:
1190 1187
1191 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() { 1188 internal::NativeWidgetPrivate* NativeWidgetPrivate::AsNativeWidgetPrivate() {
1192 return this; 1189 return this;
1193 } 1190 }
1194 1191
1195 } // namespace internal 1192 } // namespace internal
1196 } // namespace views 1193 } // namespace views
OLDNEW
« ui/gfx/compositor/compositor.gyp ('K') | « views/widget/widget.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698