Update voice search UI

This CL add the following UI:
1. A microphone button beside URL bar which triggers speech recognition prompt
to show up after pressed.
2. A speech recognition prompt UI group. This is a tiny subtree which includes:
 a. A pulsing circle as indicator that phone is listening.
 b. A solid color circle (reserved for sound level animation).
 c. A microphone vector icon.
 d. A hittable but invisible back plane which force stop speech recognition.

Bug: 777995
Change-Id: I0e9a1761d4d1ab49c4aa1fbe579e47868f12414a
Reviewed-on: https://chromium-review.googlesource.com/736449
Commit-Queue: Biao She <[email protected]>
Reviewed-by: Ian Vollick <[email protected]>
Cr-Commit-Position: refs/heads/master@{#511974}
diff --git a/chrome/browser/vr/speech_recognizer.h b/chrome/browser/vr/speech_recognizer.h
index 4b606c0..bb0747c 100644
--- a/chrome/browser/vr/speech_recognizer.h
+++ b/chrome/browser/vr/speech_recognizer.h
@@ -41,6 +41,7 @@
 enum SpeechRecognitionState {
   SPEECH_RECOGNITION_OFF = 0,
   SPEECH_RECOGNITION_READY,
+  SPEECH_RECOGNITION_END,
   SPEECH_RECOGNITION_RECOGNIZING,
   SPEECH_RECOGNITION_IN_SPEECH,
   SPEECH_RECOGNITION_NETWORK_ERROR,
@@ -51,6 +52,7 @@
   virtual void OnVoiceResults(const base::string16& result) = 0;
 };
 
+class BrowserUiInterface;
 class SpeechRecognizerOnIO;
 
 // An interface for IO to communicate with browser UI thread.
@@ -79,6 +81,7 @@
 class SpeechRecognizer : public IOBrowserUIInterface {
  public:
   SpeechRecognizer(VoiceResultDelegate* delegate,
+                   BrowserUiInterface* ui,
                    net::URLRequestContextGetter* url_request_context_getter,
                    const std::string& locale);
   ~SpeechRecognizer() override;
@@ -102,6 +105,7 @@
 
  private:
   VoiceResultDelegate* delegate_;
+  BrowserUiInterface* ui_;
   scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_;
   std::string locale_;