summaryrefslogtreecommitdiffstats
path: root/chrome/browser/speech
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-19 02:52:53 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-19 02:52:53 +0000
commit6c2381d5ec28a86536c07dfa4a398a2b6bc1a58c (patch)
treea75584b11b8ef188b4eb3376b9146e063823a916 /chrome/browser/speech
parentbf3ee201c1ca5112f7fd173fc4785aa52920c5c0 (diff)
downloadchromium_src-6c2381d5ec28a86536c07dfa4a398a2b6bc1a58c.zip
chromium_src-6c2381d5ec28a86536c07dfa4a398a2b6bc1a58c.tar.gz
chromium_src-6c2381d5ec28a86536c07dfa4a398a2b6bc1a58c.tar.bz2
Move NotificationObserver, NotificationSource, and NotificationDetails to content/public/browser.
This patch got way bigger than I wanted, but once I moved NotificationDetails, I figured I might as well mvoe the others since they're in the same files. In hindsight, I should have converted a subset of files at a time by leaving a using statement in the header. BUG=98716 TBR=joi git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106196 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/speech')
-rw-r--r--chrome/browser/speech/speech_input_bubble_controller.cc19
-rw-r--r--chrome/browser/speech/speech_input_bubble_controller.h15
2 files changed, 19 insertions, 15 deletions
diff --git a/chrome/browser/speech/speech_input_bubble_controller.cc b/chrome/browser/speech/speech_input_bubble_controller.cc
index 1cfb552..1ffb393 100644
--- a/chrome/browser/speech/speech_input_bubble_controller.cc
+++ b/chrome/browser/speech/speech_input_bubble_controller.cc
@@ -8,8 +8,8 @@
#include "chrome/browser/tab_contents/tab_util.h"
#include "content/browser/browser_thread.h"
#include "content/browser/tab_contents/tab_contents.h"
-#include "content/common/notification_registrar.h"
-#include "content/common/notification_source.h"
+#include "content/public/browser/notification_registrar.h"
+#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "ui/gfx/rect.h"
@@ -18,7 +18,7 @@ namespace speech_input {
SpeechInputBubbleController::SpeechInputBubbleController(Delegate* delegate)
: delegate_(delegate),
current_bubble_caller_id_(0),
- registrar_(new NotificationRegistrar) {
+ registrar_(new content::NotificationRegistrar) {
}
SpeechInputBubbleController::~SpeechInputBubbleController() {
@@ -111,19 +111,20 @@ void SpeechInputBubbleController::UpdateTabContentsSubscription(
if (action == BUBBLE_ADDED) {
registrar_->Add(this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
- Source<TabContents>(tab_contents));
+ content::Source<TabContents>(tab_contents));
} else {
registrar_->Remove(this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
- Source<TabContents>(tab_contents));
+ content::Source<TabContents>(tab_contents));
}
}
-void SpeechInputBubbleController::Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details) {
+void SpeechInputBubbleController::Observe(
+ int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) {
if (type == content::NOTIFICATION_TAB_CONTENTS_DESTROYED) {
// Cancel all bubbles and active recognition sessions for this tab.
- TabContents* tab_contents = Source<TabContents>(source).ptr();
+ TabContents* tab_contents = content::Source<TabContents>(source).ptr();
BubbleCallerIdMap::iterator iter = bubbles_.begin();
while (iter != bubbles_.end()) {
if (iter->second->tab_contents() == tab_contents) {
diff --git a/chrome/browser/speech/speech_input_bubble_controller.h b/chrome/browser/speech/speech_input_bubble_controller.h
index 164807d..b0f1baf 100644
--- a/chrome/browser/speech/speech_input_bubble_controller.h
+++ b/chrome/browser/speech/speech_input_bubble_controller.h
@@ -11,12 +11,15 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/speech/speech_input_bubble.h"
-#include "content/common/notification_observer.h"
+#include "content/public/browser/notification_observer.h"
namespace gfx {
class Rect;
}
+
+namespace content {
class NotificationRegistrar;
+}
namespace speech_input {
@@ -28,7 +31,7 @@ namespace speech_input {
class SpeechInputBubbleController
: public base::RefCountedThreadSafe<SpeechInputBubbleController>,
public SpeechInputBubbleDelegate,
- public NotificationObserver {
+ public content::NotificationObserver {
public:
// All methods of this delegate are called in the IO thread.
class Delegate {
@@ -80,10 +83,10 @@ class SpeechInputBubbleController
virtual void InfoBubbleButtonClicked(SpeechInputBubble::Button button);
virtual void InfoBubbleFocusChanged();
- // NotificationObserver implementation.
+ // content::NotificationObserver implementation.
virtual void Observe(int type,
- const NotificationSource& source,
- const NotificationDetails& details);
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details);
private:
// The various calls received by this object and handled in the UI thread.
@@ -132,7 +135,7 @@ class SpeechInputBubbleController
typedef std::map<int, SpeechInputBubble*> BubbleCallerIdMap;
BubbleCallerIdMap bubbles_;
- scoped_ptr<NotificationRegistrar> registrar_;
+ scoped_ptr<content::NotificationRegistrar> registrar_;
};
// This typedef is to workaround the issue with certain versions of