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

Side by Side Diff: third_party/WebKit/Source/core/frame/Settings.cpp

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. Created 4 years, 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All rights reserv ed. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All rights reserv ed.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution. 11 * documentation and/or other materials provided with the distribution.
12 * 12 *
13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY 13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */ 24 */
25 25
26 #include "core/frame/Settings.h" 26 #include "core/frame/Settings.h"
27 27
28 #include "platform/RuntimeEnabledFeatures.h" 28 #include "platform/RuntimeEnabledFeatures.h"
29 #include "platform/scroll/ScrollbarTheme.h" 29 #include "platform/scroll/ScrollbarTheme.h"
30 #include "wtf/PtrUtil.h"
31 #include <memory>
30 32
31 namespace blink { 33 namespace blink {
32 34
33 // NOTEs 35 // NOTEs
34 // 1) EditingMacBehavior comprises builds on Mac; 36 // 1) EditingMacBehavior comprises builds on Mac;
35 // 2) EditingWindowsBehavior comprises builds on Windows; 37 // 2) EditingWindowsBehavior comprises builds on Windows;
36 // 3) EditingUnixBehavior comprises all unix-based systems, but Darwin/MacOS/An droid (and then abusing the terminology); 38 // 3) EditingUnixBehavior comprises all unix-based systems, but Darwin/MacOS/An droid (and then abusing the terminology);
37 // 4) EditingAndroidBehavior comprises Android builds. 39 // 4) EditingAndroidBehavior comprises Android builds.
38 // 99) MacEditingBehavior is used a fallback. 40 // 99) MacEditingBehavior is used a fallback.
39 static EditingBehaviorType editingBehaviorTypeForPlatform() 41 static EditingBehaviorType editingBehaviorTypeForPlatform()
(...skipping 21 matching lines...) Expand all
61 #if DEBUG_TEXT_AUTOSIZING_ON_DESKTOP 63 #if DEBUG_TEXT_AUTOSIZING_ON_DESKTOP
62 : m_textAutosizingWindowSizeOverride(320, 480) 64 : m_textAutosizingWindowSizeOverride(320, 480)
63 , m_textAutosizingEnabled(true) 65 , m_textAutosizingEnabled(true)
64 #else 66 #else
65 : m_textAutosizingEnabled(false) 67 : m_textAutosizingEnabled(false)
66 #endif 68 #endif
67 SETTINGS_INITIALIZER_LIST 69 SETTINGS_INITIALIZER_LIST
68 { 70 {
69 } 71 }
70 72
71 PassOwnPtr<Settings> Settings::create() 73 std::unique_ptr<Settings> Settings::create()
72 { 74 {
73 return adoptPtr(new Settings); 75 return wrapUnique(new Settings);
74 } 76 }
75 77
76 SETTINGS_SETTER_BODIES 78 SETTINGS_SETTER_BODIES
77 79
78 void Settings::setDelegate(SettingsDelegate* delegate) 80 void Settings::setDelegate(SettingsDelegate* delegate)
79 { 81 {
80 m_delegate = delegate; 82 m_delegate = delegate;
81 } 83 }
82 84
83 void Settings::invalidate(SettingsDelegate::ChangeType changeType) 85 void Settings::invalidate(SettingsDelegate::ChangeType changeType)
(...skipping 25 matching lines...) Expand all
109 { 111 {
110 ScrollbarTheme::setMockScrollbarsEnabled(flag); 112 ScrollbarTheme::setMockScrollbarsEnabled(flag);
111 } 113 }
112 114
113 bool Settings::mockScrollbarsEnabled() 115 bool Settings::mockScrollbarsEnabled()
114 { 116 {
115 return ScrollbarTheme::mockScrollbarsEnabled(); 117 return ScrollbarTheme::mockScrollbarsEnabled();
116 } 118 }
117 119
118 } // namespace blink 120 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/Settings.h ('k') | third_party/WebKit/Source/core/frame/SettingsDelegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698