OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef CHROME_BROWSER_UI_COCOA_HANDOFF_ACTIVE_URL_OBSERVER_BRIDGE_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_HANDOFF_ACTIVE_URL_OBSERVER_BRIDGE_H_ |
6 #define CHROME_BROWSER_UI_COCOA_HANDOFF_ACTIVE_URL_OBSERVER_BRIDGE_H_ | 6 #define CHROME_BROWSER_UI_COCOA_HANDOFF_ACTIVE_URL_OBSERVER_BRIDGE_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
| 10 #include <memory> |
| 11 |
10 #include "base/macros.h" | 12 #include "base/macros.h" |
11 #include "base/memory/scoped_ptr.h" | |
12 #include "chrome/browser/ui/cocoa/handoff_active_url_observer_delegate.h" | 13 #include "chrome/browser/ui/cocoa/handoff_active_url_observer_delegate.h" |
13 | 14 |
14 namespace content { | 15 namespace content { |
15 class WebContents; | 16 class WebContents; |
16 } | 17 } |
17 | 18 |
18 class HandoffActiveURLObserver; | 19 class HandoffActiveURLObserver; |
19 | 20 |
20 // A protocol that allows ObjC objects to receive delegate callbacks from | 21 // A protocol that allows ObjC objects to receive delegate callbacks from |
21 // HandoffActiveURLObserver. | 22 // HandoffActiveURLObserver. |
(...skipping 10 matching lines...) Expand all Loading... |
32 | 33 |
33 ~HandoffActiveURLObserverBridge() override; | 34 ~HandoffActiveURLObserverBridge() override; |
34 | 35 |
35 private: | 36 private: |
36 void HandoffActiveURLChanged(content::WebContents* web_contents) override; | 37 void HandoffActiveURLChanged(content::WebContents* web_contents) override; |
37 | 38 |
38 // Instances of this class should be owned by their |delegate_|. | 39 // Instances of this class should be owned by their |delegate_|. |
39 NSObject<HandoffActiveURLObserverBridgeDelegate>* delegate_; | 40 NSObject<HandoffActiveURLObserverBridgeDelegate>* delegate_; |
40 | 41 |
41 // The C++ object that this class acts as a bridge for. | 42 // The C++ object that this class acts as a bridge for. |
42 scoped_ptr<HandoffActiveURLObserver> observer_; | 43 std::unique_ptr<HandoffActiveURLObserver> observer_; |
43 | 44 |
44 DISALLOW_COPY_AND_ASSIGN(HandoffActiveURLObserverBridge); | 45 DISALLOW_COPY_AND_ASSIGN(HandoffActiveURLObserverBridge); |
45 }; | 46 }; |
46 | 47 |
47 #endif // CHROME_BROWSER_UI_COCOA_HANDOFF_ACTIVE_URL_OBSERVER_BRIDGE_H_ | 48 #endif // CHROME_BROWSER_UI_COCOA_HANDOFF_ACTIVE_URL_OBSERVER_BRIDGE_H_ |
OLD | NEW |