OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #import <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
6 | 6 |
7 #include "chrome/browser/speech/speech_recognition_bubble.h" | 7 #include "chrome/browser/speech/speech_recognition_bubble.h" |
8 | 8 |
9 #import "base/memory/scoped_nsobject.h" | 9 #import "base/memory/scoped_nsobject.h" |
10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 | 22 |
23 // A class to bridge between the speech recognition C++ code and the Objective-C | 23 // A class to bridge between the speech recognition C++ code and the Objective-C |
24 // bubble implementation. See chrome/browser/speech/speech_recognition_bubble.h | 24 // bubble implementation. See chrome/browser/speech/speech_recognition_bubble.h |
25 // for more information on how this gets used. | 25 // for more information on how this gets used. |
26 class SpeechRecognitionBubbleImpl : public SpeechRecognitionBubbleBase { | 26 class SpeechRecognitionBubbleImpl : public SpeechRecognitionBubbleBase { |
27 public: | 27 public: |
28 SpeechRecognitionBubbleImpl(WebContents* web_contents, | 28 SpeechRecognitionBubbleImpl(WebContents* web_contents, |
29 Delegate* delegate, | 29 Delegate* delegate, |
30 const gfx::Rect& element_rect); | 30 const gfx::Rect& element_rect); |
31 virtual ~SpeechRecognitionBubbleImpl(); | 31 virtual ~SpeechRecognitionBubbleImpl(); |
32 virtual void Show(); | 32 virtual void Show() OVERRIDE; |
33 virtual void Hide(); | 33 virtual void Hide() OVERRIDE; |
34 virtual void UpdateLayout(); | 34 virtual void UpdateLayout() OVERRIDE; |
35 virtual void UpdateImage(); | 35 virtual void UpdateImage() OVERRIDE; |
36 | 36 |
37 private: | 37 private: |
38 scoped_nsobject<SpeechRecognitionWindowController> window_; | 38 scoped_nsobject<SpeechRecognitionWindowController> window_; |
39 Delegate* delegate_; | 39 Delegate* delegate_; |
40 gfx::Rect element_rect_; | 40 gfx::Rect element_rect_; |
41 }; | 41 }; |
42 | 42 |
43 SpeechRecognitionBubbleImpl::SpeechRecognitionBubbleImpl( | 43 SpeechRecognitionBubbleImpl::SpeechRecognitionBubbleImpl( |
44 WebContents* web_contents, | 44 WebContents* web_contents, |
45 Delegate* delegate, | 45 Delegate* delegate, |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 } | 124 } |
125 | 125 |
126 } // namespace | 126 } // namespace |
127 | 127 |
128 SpeechRecognitionBubble* SpeechRecognitionBubble::CreateNativeBubble( | 128 SpeechRecognitionBubble* SpeechRecognitionBubble::CreateNativeBubble( |
129 WebContents* web_contents, | 129 WebContents* web_contents, |
130 Delegate* delegate, | 130 Delegate* delegate, |
131 const gfx::Rect& element_rect) { | 131 const gfx::Rect& element_rect) { |
132 return new SpeechRecognitionBubbleImpl(web_contents, delegate, element_rect); | 132 return new SpeechRecognitionBubbleImpl(web_contents, delegate, element_rect); |
133 } | 133 } |
OLD | NEW |