Deduplicate the ShouldDuckFlash function

Two files had identical ShouldDuckFlash functions which clashed
in jumbo builds (chromium unity build implementation where
source files are merged).

This patch moves the function to media_switches so it can be used by
all code.

Bug: 746953
Change-Id: I0665384f82e8bb3f0dfd6a536d1535b57c9bfe78
Reviewed-on: https://chromium-review.googlesource.com/723468
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: Mounir Lamouri <mlamouri@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#510624}
4 files changed