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

Side by Side Diff: chrome/browser/android/voice_search_tab_helper.h

Issue 979813004: Make VoiceSearchTabHelper a purely native object (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 9 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 2014 The Chromium Authors. All rights reserved. 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 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 #ifndef CHROME_BROWSER_ANDROID_VOICE_SEARCH_TAB_HELPER_H_ 5 #ifndef CHROME_BROWSER_ANDROID_VOICE_SEARCH_TAB_HELPER_H_
6 #define CHROME_BROWSER_ANDROID_VOICE_SEARCH_TAB_HELPER_H_ 6 #define CHROME_BROWSER_ANDROID_VOICE_SEARCH_TAB_HELPER_H_
7 7
8 #include "base/android/jni_android.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"
9 11
10 bool RegisterVoiceSearchTabHelper(JNIEnv* env); 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;
18
19 // content::WebContentsObserver overrides.
20 void NavigationEntryCommitted(
21 const content::LoadCommittedDetails& load_details) override;
22
23 private:
24 explicit VoiceSearchTabHelper(content::WebContents* contents);
25 friend class content::WebContentsUserData<VoiceSearchTabHelper>;
26
27 bool gesture_requirement_for_playback_disabled_;
28
29 DISALLOW_COPY_AND_ASSIGN(VoiceSearchTabHelper);
30 };
11 31
12 #endif // CHROME_BROWSER_ANDROID_VOICE_SEARCH_TAB_HELPER_H_ 32 #endif // CHROME_BROWSER_ANDROID_VOICE_SEARCH_TAB_HELPER_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/chrome_jni_registrar.cc ('k') | chrome/browser/android/voice_search_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698