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

Side by Side Diff: content/browser/media/capture/window_activity_tracker_mac.mm

Issue 1994013002: Fix "unused variable" warnings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync to latest behavior Created 4 years, 7 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "content/browser/media/capture/window_activity_tracker_mac.h" 5 #include "content/browser/media/capture/window_activity_tracker_mac.h"
6 6
7 #include <AppKit/AppKit.h> 7 #include <AppKit/AppKit.h>
8 #include <CoreFoundation/CoreFoundation.h> 8 #include <CoreFoundation/CoreFoundation.h>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 namespace content { 53 namespace content {
54 54
55 // static 55 // static
56 std::unique_ptr<WindowActivityTracker> WindowActivityTracker::Create( 56 std::unique_ptr<WindowActivityTracker> WindowActivityTracker::Create(
57 gfx::NativeView view) { 57 gfx::NativeView view) {
58 return std::unique_ptr<WindowActivityTracker>( 58 return std::unique_ptr<WindowActivityTracker>(
59 new WindowActivityTrackerMac(view)); 59 new WindowActivityTrackerMac(view));
60 } 60 }
61 61
62 WindowActivityTrackerMac::WindowActivityTrackerMac(NSView* view) 62 WindowActivityTrackerMac::WindowActivityTrackerMac(NSView* view)
63 : view_(view), weak_factory_(this) { 63 : weak_factory_(this) {
64 mouse_tracker_.reset([[MouseTracker alloc] initWithView:view]); 64 mouse_tracker_.reset([[MouseTracker alloc] initWithView:view]);
65 [mouse_tracker_ registerMouseInteractionObserver: 65 [mouse_tracker_ registerMouseInteractionObserver:
66 base::Bind(&WindowActivityTrackerMac::OnMouseActivity, 66 base::Bind(&WindowActivityTrackerMac::OnMouseActivity,
67 base::Unretained(this))]; 67 base::Unretained(this))];
68 } 68 }
69 69
70 WindowActivityTrackerMac::~WindowActivityTrackerMac() { 70 WindowActivityTrackerMac::~WindowActivityTrackerMac() {
71 [mouse_tracker_ stopTracking]; 71 [mouse_tracker_ stopTracking];
72 } 72 }
73 73
74 void WindowActivityTrackerMac::OnMouseActivity() { 74 void WindowActivityTrackerMac::OnMouseActivity() {
75 WindowActivityTracker::OnMouseActivity(); 75 WindowActivityTracker::OnMouseActivity();
76 } 76 }
77 77
78 base::WeakPtr<WindowActivityTracker> WindowActivityTrackerMac::GetWeakPtr() { 78 base::WeakPtr<WindowActivityTracker> WindowActivityTrackerMac::GetWeakPtr() {
79 return weak_factory_.GetWeakPtr(); 79 return weak_factory_.GetWeakPtr();
80 } 80 }
81 81
82 } // namespace content 82 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/media/capture/window_activity_tracker_mac.h ('k') | content/browser/ppapi_plugin_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698