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

Side by Side Diff: chrome/browser/ui/cocoa/handoff_active_url_observer_bridge.h

Issue 794853004: Reland 1: "mac: Allow Chrome to hand off its active URL to other devices." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments from avi. Created 6 years 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_COCOA_HANDOFF_ACTIVE_URL_OBSERVER_BRIDGE_H_
6 #define CHROME_BROWSER_UI_COCOA_HANDOFF_ACTIVE_URL_OBSERVER_BRIDGE_H_
7
8 #import <Cocoa/Cocoa.h>
9
10 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "chrome/browser/ui/cocoa/handoff_active_url_observer_delegate.h"
13
14 namespace content {
15 class WebContents;
16 }
17
18 class HandoffActiveURLObserver;
19
20 // A protocol that allows ObjC objects to receive delegate callbacks from
21 // HandoffActiveURLObserver.
22 @protocol HandoffActiveURLObserverBridgeDelegate
23 - (void)handoffActiveURLChanged:(content::WebContents*)webContents;
24 @end
25
26 // This class allows an ObjC object to receive the delegate callbacks from an
27 // HandoffActiveURLObserver.
28 class HandoffActiveURLObserverBridge : public HandoffActiveURLObserverDelegate {
29 public:
30 explicit HandoffActiveURLObserverBridge(
31 NSObject<HandoffActiveURLObserverBridgeDelegate>* delegate);
32
33 ~HandoffActiveURLObserverBridge() override;
34
35 private:
36 void HandoffActiveURLChanged(content::WebContents* web_contents) override;
37
38 // Instances of this class should be owned by their |delegate_|.
39 NSObject<HandoffActiveURLObserverBridgeDelegate>* delegate_;
40
41 // The C++ object that this class acts as a bridge for.
42 scoped_ptr<HandoffActiveURLObserver> observer_;
43
44 DISALLOW_COPY_AND_ASSIGN(HandoffActiveURLObserverBridge);
45 };
46
47 #endif // CHROME_BROWSER_UI_COCOA_HANDOFF_ACTIVE_URL_OBSERVER_BRIDGE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/handoff_active_url_observer.cc ('k') | chrome/browser/ui/cocoa/handoff_active_url_observer_bridge.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698