| 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 <memory> |
| 8 #include "platform/ContentSettingCallbacks.h" | 8 #include "platform/ContentSettingCallbacks.h" |
| 9 #include "platform/wtf/RefCounted.h" | 9 #include "platform/wtf/RefCounted.h" |
| 10 | 10 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 void WebContentSettingCallbacks::Reset() { | 36 void WebContentSettingCallbacks::Reset() { |
| 37 private_.Reset(); | 37 private_.Reset(); |
| 38 } | 38 } |
| 39 | 39 |
| 40 void WebContentSettingCallbacks::Assign( | 40 void WebContentSettingCallbacks::Assign( |
| 41 const WebContentSettingCallbacks& other) { | 41 const WebContentSettingCallbacks& other) { |
| 42 private_ = other.private_; | 42 private_ = other.private_; |
| 43 } | 43 } |
| 44 | 44 |
| 45 void WebContentSettingCallbacks::DoAllow() { | 45 void WebContentSettingCallbacks::DoAllow() { |
| 46 ASSERT(!private_.IsNull()); | 46 DCHECK(!private_.IsNull()); |
| 47 private_->Callbacks()->OnAllowed(); | 47 private_->Callbacks()->OnAllowed(); |
| 48 private_.Reset(); | 48 private_.Reset(); |
| 49 } | 49 } |
| 50 | 50 |
| 51 void WebContentSettingCallbacks::DoDeny() { | 51 void WebContentSettingCallbacks::DoDeny() { |
| 52 ASSERT(!private_.IsNull()); | 52 DCHECK(!private_.IsNull()); |
| 53 private_->Callbacks()->OnDenied(); | 53 private_->Callbacks()->OnDenied(); |
| 54 private_.Reset(); | 54 private_.Reset(); |
| 55 } | 55 } |
| 56 | 56 |
| 57 } // namespace blink | 57 } // namespace blink |
| OLD | NEW |