Refactor SharedMemory::Create and fix a rare file leak.
[chromium-blink-merge.git] / chrome / browser / android / voice_search_tab_helper.h
blobc0e62922327d0dfb4b7fc218f3481f0ae72ddd8f
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.
5 #ifndef CHROME_BROWSER_ANDROID_VOICE_SEARCH_TAB_HELPER_H_
6 #define CHROME_BROWSER_ANDROID_VOICE_SEARCH_TAB_HELPER_H_
8 #include "base/macros.h"
9 #include "content/public/browser/web_contents_observer.h"
10 #include "content/public/browser/web_contents_user_data.h"
12 // Tab helper to toggle media autoplay for voice URL searches.
13 class VoiceSearchTabHelper
14 : public content::WebContentsObserver,
15 public content::WebContentsUserData<VoiceSearchTabHelper> {
16 public:
17 ~VoiceSearchTabHelper() override;
19 // content::WebContentsObserver overrides.
20 void NavigationEntryCommitted(
21 const content::LoadCommittedDetails& load_details) override;
23 private:
24 explicit VoiceSearchTabHelper(content::WebContents* contents);
25 friend class content::WebContentsUserData<VoiceSearchTabHelper>;
27 bool gesture_requirement_for_playback_disabled_;
29 DISALLOW_COPY_AND_ASSIGN(VoiceSearchTabHelper);
32 #endif // CHROME_BROWSER_ANDROID_VOICE_SEARCH_TAB_HELPER_H_