OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "public/platform/WebContentSettingCallbacks.h" | 5 #include "public/platform/WebContentSettingCallbacks.h" |
6 | 6 |
| 7 #include <memory> |
7 #include "platform/ContentSettingCallbacks.h" | 8 #include "platform/ContentSettingCallbacks.h" |
8 #include "wtf/RefCounted.h" | 9 #include "wtf/RefCounted.h" |
9 #include <memory> | |
10 | 10 |
11 namespace blink { | 11 namespace blink { |
12 | 12 |
13 class WebContentSettingCallbacksPrivate | 13 class WebContentSettingCallbacksPrivate |
14 : public RefCounted<WebContentSettingCallbacksPrivate> { | 14 : public RefCounted<WebContentSettingCallbacksPrivate> { |
15 public: | 15 public: |
16 static PassRefPtr<WebContentSettingCallbacksPrivate> create( | 16 static PassRefPtr<WebContentSettingCallbacksPrivate> create( |
17 std::unique_ptr<ContentSettingCallbacks> callbacks) { | 17 std::unique_ptr<ContentSettingCallbacks> callbacks) { |
18 return adoptRef( | 18 return adoptRef( |
19 new WebContentSettingCallbacksPrivate(std::move(callbacks))); | 19 new WebContentSettingCallbacksPrivate(std::move(callbacks))); |
(...skipping 28 matching lines...) Expand all Loading... |
48 m_private.reset(); | 48 m_private.reset(); |
49 } | 49 } |
50 | 50 |
51 void WebContentSettingCallbacks::doDeny() { | 51 void WebContentSettingCallbacks::doDeny() { |
52 ASSERT(!m_private.isNull()); | 52 ASSERT(!m_private.isNull()); |
53 m_private->callbacks()->onDenied(); | 53 m_private->callbacks()->onDenied(); |
54 m_private.reset(); | 54 m_private.reset(); |
55 } | 55 } |
56 | 56 |
57 } // namespace blink | 57 } // namespace blink |
OLD | NEW |