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

Issue 10824162: add device notification to Mac (Closed)

Created:
8 years, 4 months ago by no longer working on chromium
Modified:
8 years, 4 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, Lei Zhang
Visibility:
Public.

Description

Add DeviceMonitorMac to BrowserMainLoop. DeviceMonitorMac detects device changing and forwards the notifications to the system monitor. BUG=137799 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=151689

Patch Set 1 #

Total comments: 18

Patch Set 2 : addressed Tommi's comments #

Total comments: 11

Patch Set 3 : address the comments from Wei and Lei #

Total comments: 22

Patch Set 4 : addressed Avi's comments and reduced the dupped code. #

Patch Set 5 : delete the monitors before system_monitor_ in browser_main_loop_. #

Total comments: 18

Patch Set 6 : addressed avi's comments and wei's comments. #

Total comments: 21

Patch Set 7 : addressed Mark's comments #

Patch Set 8 : moved the .mm to .cc, changed const struct back to stuct #

Total comments: 2

Patch Set 9 : use kIOAudioDeviceClassName to cover the bluetooth devices and changed to use std::vector #

Total comments: 15

Patch Set 10 : addressed Mark's comments. #

Patch Set 11 : updated a comment. #

Patch Set 12 : fixed linux bots. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+232 lines, -0 lines) Patch
M content/browser/browser_main_loop.h View 2 chunks +4 lines, -0 lines 0 comments Download
M content/browser/browser_main_loop.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +15 lines, -0 lines 0 comments Download
A content/browser/device_monitor_mac.h View 1 2 3 4 5 6 7 8 9 1 chunk +44 lines, -0 lines 0 comments Download
A content/browser/device_monitor_mac.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +167 lines, -0 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 38 (0 generated)
no longer working on chromium
Hello, This is part for the device notification, a feature we are going to deliver ...
8 years, 4 months ago (2012-08-03 10:07:04 UTC) #1
tommi (sloooow) - chröme
rubberstamp lgtm with the below fixed. I'm not qualified to review the mac code unfortunately, ...
8 years, 4 months ago (2012-08-03 11:24:29 UTC) #2
no longer working on chromium
Many thanks to Tommi for reviewing the CL. I have already addressed all the comments. ...
8 years, 4 months ago (2012-08-03 13:07:07 UTC) #3
wjia(left Chromium)
Nice work! I will leave Mac platform specific stuff Mac experts. http://codereview.chromium.org/10824162/diff/3002/content/browser/device_monitor_mac.h File content/browser/device_monitor_mac.h (right): ...
8 years, 4 months ago (2012-08-03 13:50:08 UTC) #4
Lei Zhang
Please find a mac expert to review the .mm file. http://codereview.chromium.org/10824162/diff/3002/content/content_browser.gypi File content/content_browser.gypi (right): http://codereview.chromium.org/10824162/diff/3002/content/content_browser.gypi#newcode279 ...
8 years, 4 months ago (2012-08-03 14:39:49 UTC) #5
wjia(left Chromium)
http://codereview.chromium.org/10824162/diff/3002/content/browser/device_monitor_mac.mm File content/browser/device_monitor_mac.mm (right): http://codereview.chromium.org/10824162/diff/3002/content/browser/device_monitor_mac.mm#newcode131 content/browser/device_monitor_mac.mm:131: this, if the type, instead of |this|, is used ...
8 years, 4 months ago (2012-08-03 15:21:04 UTC) #6
no longer working on chromium
Adding Avi for the Mac specific code. http://codereview.chromium.org/10824162/diff/3002/content/browser/device_monitor_mac.h File content/browser/device_monitor_mac.h (right): http://codereview.chromium.org/10824162/diff/3002/content/browser/device_monitor_mac.h#newcode27 content/browser/device_monitor_mac.h:27: void NotifyVideoDeviceChanged(); ...
8 years, 4 months ago (2012-08-03 16:10:15 UTC) #7
no longer working on chromium
Added thakis, and hope either of Avi or thakis can help reviewing the Mac code.
8 years, 4 months ago (2012-08-03 16:54:36 UTC) #8
Nico
Since Avi is a content OWNER, I'll leave this to him.
8 years, 4 months ago (2012-08-03 19:26:12 UTC) #9
Avi (use Gerrit)
http://codereview.chromium.org/10824162/diff/8002/content/browser/device_monitor_mac.mm File content/browser/device_monitor_mac.mm (right): http://codereview.chromium.org/10824162/diff/8002/content/browser/device_monitor_mac.mm#newcode17 content/browser/device_monitor_mac.mm:17: DeviceMonitorMac* InstanceFromContext(void* context) { Does this help in readability? ...
8 years, 4 months ago (2012-08-03 19:41:23 UTC) #10
wjia(left Chromium)
Since you talked about timeline for this patch, I spent less than an hour to ...
8 years, 4 months ago (2012-08-03 21:30:35 UTC) #11
no longer working on chromium
Avi and Wei, could you please take another look. I am discussing with Wei offline ...
8 years, 4 months ago (2012-08-06 09:43:11 UTC) #12
Avi (use Gerrit)
Multiple comments that I made on a previous snapshot and that were marked as fixed ...
8 years, 4 months ago (2012-08-06 13:54:36 UTC) #13
no longer working on chromium
Avi and Wei, could you please take another look. I think I have addressed all ...
8 years, 4 months ago (2012-08-06 19:53:12 UTC) #14
Avi (use Gerrit)
Mac code LGTM. https://chromiumcodereview.appspot.com/10824162/diff/16001/content/browser/device_monitor_mac.mm File content/browser/device_monitor_mac.mm (right): https://chromiumcodereview.appspot.com/10824162/diff/16001/content/browser/device_monitor_mac.mm#newcode65 content/browser/device_monitor_mac.mm:65: for (; this_object; this_object.reset(IOIteratorNext(devices_iterator))); Do we ...
8 years, 4 months ago (2012-08-06 20:29:47 UTC) #15
no longer working on chromium
Many thanks to avi. https://chromiumcodereview.appspot.com/10824162/diff/16001/content/browser/device_monitor_mac.mm File content/browser/device_monitor_mac.mm (right): https://chromiumcodereview.appspot.com/10824162/diff/16001/content/browser/device_monitor_mac.mm#newcode65 content/browser/device_monitor_mac.mm:65: for (; this_object; this_object.reset(IOIteratorNext(devices_iterator))); On ...
8 years, 4 months ago (2012-08-06 22:01:10 UTC) #16
Mark Mentovai
http://codereview.chromium.org/10824162/diff/17007/content/browser/device_monitor_mac.mm File content/browser/device_monitor_mac.mm (right): http://codereview.chromium.org/10824162/diff/17007/content/browser/device_monitor_mac.mm#newcode1 content/browser/device_monitor_mac.mm:1: // Copyright (c) 2012 The Chromium Authors. All rights ...
8 years, 4 months ago (2012-08-07 18:39:10 UTC) #17
wjia(left Chromium)
http://codereview.chromium.org/10824162/diff/17007/content/browser/device_monitor_mac.mm File content/browser/device_monitor_mac.mm (right): http://codereview.chromium.org/10824162/diff/17007/content/browser/device_monitor_mac.mm#newcode109 content/browser/device_monitor_mac.mm:109: switch (kDeviceServices[i].device_type) { After chatting with mmentovai@, my understanding ...
8 years, 4 months ago (2012-08-07 20:57:27 UTC) #18
no longer working on chromium
http://codereview.chromium.org/10824162/diff/17007/content/browser/device_monitor_mac.mm File content/browser/device_monitor_mac.mm (right): http://codereview.chromium.org/10824162/diff/17007/content/browser/device_monitor_mac.mm#newcode1 content/browser/device_monitor_mac.mm:1: // Copyright (c) 2012 The Chromium Authors. All rights ...
8 years, 4 months ago (2012-08-08 08:42:42 UTC) #19
no longer working on chromium
http://codereview.chromium.org/10824162/diff/4013/content/browser/device_monitor_mac.cc File content/browser/device_monitor_mac.cc (right): http://codereview.chromium.org/10824162/diff/4013/content/browser/device_monitor_mac.cc#newcode17 content/browser/device_monitor_mac.cc:17: struct { We can't use const struct here because ...
8 years, 4 months ago (2012-08-08 09:23:16 UTC) #20
Mark Mentovai
http://codereview.chromium.org/10824162/diff/17007/content/browser/device_monitor_mac.mm File content/browser/device_monitor_mac.mm (right): http://codereview.chromium.org/10824162/diff/17007/content/browser/device_monitor_mac.mm#newcode92 content/browser/device_monitor_mac.mm:92: for (size_t i = 0; i < arraysize(kDeviceServices); ++i) ...
8 years, 4 months ago (2012-08-08 12:32:57 UTC) #21
Mark Mentovai
http://codereview.chromium.org/10824162/diff/4013/content/browser/device_monitor_mac.cc File content/browser/device_monitor_mac.cc (right): http://codereview.chromium.org/10824162/diff/4013/content/browser/device_monitor_mac.cc#newcode17 content/browser/device_monitor_mac.cc:17: struct { On 2012/08/08 09:23:16, xians1 wrote: > We ...
8 years, 4 months ago (2012-08-08 12:38:03 UTC) #22
wjia(left Chromium)
On 2012/08/08 08:42:42, xians1 wrote: > http://codereview.chromium.org/10824162/diff/17007/content/browser/device_monitor_mac.mm > File content/browser/device_monitor_mac.mm (right): > > http://codereview.chromium.org/10824162/diff/17007/content/browser/device_monitor_mac.mm#newcode1 > ...
8 years, 4 months ago (2012-08-08 13:55:36 UTC) #23
no longer working on chromium
Mark, Could you please take another look at the new version. The changes include: # ...
8 years, 4 months ago (2012-08-14 14:53:40 UTC) #24
Mark Mentovai
LGTM with these minor changes. http://codereview.chromium.org/10824162/diff/18008/content/browser/device_monitor_mac.cc File content/browser/device_monitor_mac.cc (right): http://codereview.chromium.org/10824162/diff/18008/content/browser/device_monitor_mac.cc#newcode16 content/browser/device_monitor_mac.cc:16: namespace { We also ...
8 years, 4 months ago (2012-08-14 15:37:05 UTC) #25
no longer working on chromium
Thanks Mark. I am going to land it soon. http://codereview.chromium.org/10824162/diff/18008/content/browser/device_monitor_mac.cc File content/browser/device_monitor_mac.cc (right): http://codereview.chromium.org/10824162/diff/18008/content/browser/device_monitor_mac.cc#newcode16 content/browser/device_monitor_mac.cc:16: ...
8 years, 4 months ago (2012-08-14 15:59:36 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/xians@chromium.org/10824162/18011
8 years, 4 months ago (2012-08-14 16:00:05 UTC) #27
Mark Mentovai
http://codereview.chromium.org/10824162/diff/18008/content/browser/device_monitor_mac.cc File content/browser/device_monitor_mac.cc (right): http://codereview.chromium.org/10824162/diff/18008/content/browser/device_monitor_mac.cc#newcode116 content/browser/device_monitor_mac.cc:116: // Retain |arraysize(kServices) -1| additional dictionary references because xians1 ...
8 years, 4 months ago (2012-08-14 16:02:52 UTC) #28
no longer working on chromium
On 2012/08/14 16:02:52, Mark Mentovai wrote: > http://codereview.chromium.org/10824162/diff/18008/content/browser/device_monitor_mac.cc > File content/browser/device_monitor_mac.cc (right): > > http://codereview.chromium.org/10824162/diff/18008/content/browser/device_monitor_mac.cc#newcode116 ...
8 years, 4 months ago (2012-08-14 16:31:46 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/xians@chromium.org/10824162/18013
8 years, 4 months ago (2012-08-14 16:31:57 UTC) #30
Mark Mentovai
LGTM
8 years, 4 months ago (2012-08-14 16:32:18 UTC) #31
commit-bot: I haz the power
Try job failure for 10824162-18013 (retry) on linux_rel for steps "interactive_ui_tests, browser_tests, content_browsertests". It's a ...
8 years, 4 months ago (2012-08-14 17:27:45 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/xians@chromium.org/10824162/18013
8 years, 4 months ago (2012-08-14 20:34:39 UTC) #33
commit-bot: I haz the power
Try job failure for 10824162-18013 (retry) (retry) on linux_chromeos for steps "interactive_ui_tests, browser_tests, content_browsertests". It's ...
8 years, 4 months ago (2012-08-14 22:15:20 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/xians@chromium.org/10824162/18013
8 years, 4 months ago (2012-08-15 07:38:55 UTC) #35
commit-bot: I haz the power
Try job failure for 10824162-18013 (retry) on linux_rel for steps "interactive_ui_tests, browser_tests, content_browsertests". It's a ...
8 years, 4 months ago (2012-08-15 09:06:00 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/xians@chromium.org/10824162/16010
8 years, 4 months ago (2012-08-15 10:32:20 UTC) #37
commit-bot: I haz the power
8 years, 4 months ago (2012-08-15 12:51:43 UTC) #38
Change committed as 151689

Powered by Google App Engine
This is Rietveld 408576698