Commit 84c13c03 authored by dpranke@chromium.org's avatar dpranke@chromium.org

Reland r102332 - export more symbols needed for the component build

of content and also move a couple of functions to content that should've
been moved earlier.

BUG=90442
TBR=jam@chromium.org,allanwoj@chromium.org
TEST=

Review URL: http://codereview.chromium.org/7969028

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102405 0039d316-1c4b-4281-b951-d872f2087c98
parent 4e6239c7
...@@ -87,14 +87,6 @@ class ChromeSpeechInputManager::OptionalRequestInfo ...@@ -87,14 +87,6 @@ class ChromeSpeechInputManager::OptionalRequestInfo
DISALLOW_COPY_AND_ASSIGN(OptionalRequestInfo); DISALLOW_COPY_AND_ASSIGN(OptionalRequestInfo);
}; };
ChromeSpeechInputManager::SpeechInputRequest::SpeechInputRequest()
: delegate(NULL),
is_active(false) {
}
ChromeSpeechInputManager::SpeechInputRequest::~SpeechInputRequest() {
}
ChromeSpeechInputManager* ChromeSpeechInputManager::GetInstance() { ChromeSpeechInputManager* ChromeSpeechInputManager::GetInstance() {
return Singleton<ChromeSpeechInputManager>::get(); return Singleton<ChromeSpeechInputManager>::get();
} }
......
// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include "base/basictypes.h" #include "base/basictypes.h"
#include "content/browser/browser_thread.h" #include "content/browser/browser_thread.h"
#include "content/common/content_export.h"
class NotificationService; class NotificationService;
...@@ -20,7 +21,7 @@ class NotificationService; ...@@ -20,7 +21,7 @@ class NotificationService;
// Applications must initialize the COM library before they can call // Applications must initialize the COM library before they can call
// COM library functions other than CoGetMalloc and memory allocation // COM library functions other than CoGetMalloc and memory allocation
// functions, so this class initializes COM for those users. // functions, so this class initializes COM for those users.
class BrowserProcessSubThread : public BrowserThread { class CONTENT_EXPORT BrowserProcessSubThread : public BrowserThread {
public: public:
explicit BrowserProcessSubThread(BrowserThread::ID identifier); explicit BrowserProcessSubThread(BrowserThread::ID identifier);
virtual ~BrowserProcessSubThread(); virtual ~BrowserProcessSubThread();
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include "base/file_path.h" #include "base/file_path.h"
#include "base/memory/linked_ptr.h" #include "base/memory/linked_ptr.h"
#include "base/synchronization/lock.h" #include "base/synchronization/lock.h"
#include "content/common/content_export.h"
#include "net/base/file_stream.h" #include "net/base/file_stream.h"
namespace net { namespace net {
...@@ -33,7 +34,7 @@ struct DownloadBuffer { ...@@ -33,7 +34,7 @@ struct DownloadBuffer {
}; };
// Holds the information about how to save a download file. // Holds the information about how to save a download file.
struct DownloadSaveInfo { struct CONTENT_EXPORT DownloadSaveInfo {
DownloadSaveInfo(); DownloadSaveInfo();
DownloadSaveInfo(const DownloadSaveInfo& info); DownloadSaveInfo(const DownloadSaveInfo& info);
~DownloadSaveInfo(); ~DownloadSaveInfo();
......
...@@ -184,4 +184,12 @@ void SpeechInputManager::OnFocusChanged(int caller_id) { ...@@ -184,4 +184,12 @@ void SpeechInputManager::OnFocusChanged(int caller_id) {
} }
} }
SpeechInputManager::SpeechInputRequest::SpeechInputRequest()
: delegate(NULL),
is_active(false) {
}
SpeechInputManager::SpeechInputRequest::~SpeechInputRequest() {
}
} // namespace speech_input } // namespace speech_input
...@@ -20,7 +20,7 @@ namespace speech_input { ...@@ -20,7 +20,7 @@ namespace speech_input {
// handles requests received from various render views and makes sure only one // handles requests received from various render views and makes sure only one
// of them can use speech recognition at a time. It also sends recognition // of them can use speech recognition at a time. It also sends recognition
// results and status events to the render views when required. // results and status events to the render views when required.
class SpeechInputManager : public SpeechRecognizerDelegate { class CONTENT_EXPORT SpeechInputManager : public SpeechRecognizerDelegate {
public: public:
// Implemented by the dispatcher host to relay events to the render views. // Implemented by the dispatcher host to relay events to the render views.
class Delegate { class Delegate {
...@@ -35,13 +35,13 @@ class SpeechInputManager : public SpeechRecognizerDelegate { ...@@ -35,13 +35,13 @@ class SpeechInputManager : public SpeechRecognizerDelegate {
virtual ~Delegate() {} virtual ~Delegate() {}
}; };
CONTENT_EXPORT SpeechInputManager(); SpeechInputManager();
// Invokes the platform provided microphone settings UI in a non-blocking way, // Invokes the platform provided microphone settings UI in a non-blocking way,
// via the BrowserThread::FILE thread. // via the BrowserThread::FILE thread.
static void ShowAudioInputSettings(); static void ShowAudioInputSettings();
CONTENT_EXPORT virtual ~SpeechInputManager(); virtual ~SpeechInputManager();
// Handlers for requests from render views. // Handlers for requests from render views.
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include "base/basictypes.h" #include "base/basictypes.h"
#include "base/memory/ref_counted.h" #include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h" #include "base/memory/scoped_ptr.h"
#include "content/common/content_export.h"
#include "content/common/net/url_fetcher.h" #include "content/common/net/url_fetcher.h"
#include "content/common/speech_input_result.h" #include "content/common/speech_input_result.h"
#include "googleurl/src/gurl.h" #include "googleurl/src/gurl.h"
...@@ -31,7 +32,7 @@ class SpeechRecognitionRequest : public URLFetcher::Delegate { ...@@ -31,7 +32,7 @@ class SpeechRecognitionRequest : public URLFetcher::Delegate {
static int url_fetcher_id_for_tests; static int url_fetcher_id_for_tests;
// Interface for receiving callbacks from this object. // Interface for receiving callbacks from this object.
class Delegate { class CONTENT_EXPORT Delegate {
public: public:
virtual void SetRecognitionResult( virtual void SetRecognitionResult(
bool error, const SpeechInputResultArray& result) = 0; bool error, const SpeechInputResultArray& result) = 0;
......
...@@ -21,7 +21,7 @@ namespace speech_input { ...@@ -21,7 +21,7 @@ namespace speech_input {
// Records audio, sends recorded audio to server and translates server response // Records audio, sends recorded audio to server and translates server response
// to recognition result. // to recognition result.
class SpeechRecognizer class CONTENT_EXPORT SpeechRecognizer
: public base::RefCountedThreadSafe<SpeechRecognizer>, : public base::RefCountedThreadSafe<SpeechRecognizer>,
public media::AudioInputController::EventHandler, public media::AudioInputController::EventHandler,
public SpeechRecognitionRequestDelegate { public SpeechRecognitionRequestDelegate {
...@@ -35,7 +35,7 @@ class SpeechRecognizer ...@@ -35,7 +35,7 @@ class SpeechRecognizer
}; };
// Implemented by the caller to receive recognition events. // Implemented by the caller to receive recognition events.
class Delegate { class CONTENT_EXPORT Delegate {
public: public:
virtual void SetRecognitionResult( virtual void SetRecognitionResult(
int caller_id, int caller_id,
...@@ -79,27 +79,27 @@ class SpeechRecognizer ...@@ -79,27 +79,27 @@ class SpeechRecognizer
virtual ~Delegate() {} virtual ~Delegate() {}
}; };
CONTENT_EXPORT SpeechRecognizer(Delegate* delegate, SpeechRecognizer(Delegate* delegate,
int caller_id, int caller_id,
const std::string& language, const std::string& language,
const std::string& grammar, const std::string& grammar,
bool censor_results, bool censor_results,
const std::string& hardware_info, const std::string& hardware_info,
const std::string& origin_url); const std::string& origin_url);
virtual ~SpeechRecognizer(); virtual ~SpeechRecognizer();
// Starts audio recording and does recognition after recording ends. The same // Starts audio recording and does recognition after recording ends. The same
// SpeechRecognizer instance can be used multiple times for speech recognition // SpeechRecognizer instance can be used multiple times for speech recognition
// though each recognition request can be made only after the previous one // though each recognition request can be made only after the previous one
// completes (i.e. after receiving Delegate::DidCompleteRecognition). // completes (i.e. after receiving Delegate::DidCompleteRecognition).
CONTENT_EXPORT bool StartRecording(); bool StartRecording();
// Stops recording audio and starts recognition. // Stops recording audio and starts recognition.
CONTENT_EXPORT void StopRecording(); void StopRecording();
// Stops recording audio and cancels recognition. Any audio recorded so far // Stops recording audio and cancels recognition. Any audio recorded so far
// gets discarded. // gets discarded.
CONTENT_EXPORT void CancelRecognition(); void CancelRecognition();
// AudioInputController::EventHandler methods. // AudioInputController::EventHandler methods.
virtual void OnCreated(media::AudioInputController* controller) { } virtual void OnCreated(media::AudioInputController* controller) { }
......
...@@ -344,11 +344,11 @@ class RenderView : public RenderWidget, ...@@ -344,11 +344,11 @@ class RenderView : public RenderWidget,
// |actual_mime_type| is the actual mime type supported by the // |actual_mime_type| is the actual mime type supported by the
// plugin found that match the URL given (one for each item in // plugin found that match the URL given (one for each item in
// |info|). // |info|).
bool GetPluginInfo(const GURL& url, CONTENT_EXPORT bool GetPluginInfo(const GURL& url,
const GURL& page_url, const GURL& page_url,
const std::string& mime_type, const std::string& mime_type,
webkit::WebPluginInfo* plugin_info, webkit::WebPluginInfo* plugin_info,
std::string* actual_mime_type); std::string* actual_mime_type);
// Asks the host to create a block of shared memory for the renderer. // Asks the host to create a block of shared memory for the renderer.
// The shared memory handle allocated by the host is returned back. // The shared memory handle allocated by the host is returned back.
......
...@@ -41,7 +41,7 @@ class MEDIA_EXPORT AudioInputController ...@@ -41,7 +41,7 @@ class MEDIA_EXPORT AudioInputController
public: public:
// An event handler that receives events from the AudioInputController. The // An event handler that receives events from the AudioInputController. The
// following methods are called on the audio input controller thread. // following methods are called on the audio input controller thread.
class EventHandler { class MEDIA_EXPORT EventHandler {
public: public:
virtual ~EventHandler() {} virtual ~EventHandler() {}
virtual void OnCreated(AudioInputController* controller) = 0; virtual void OnCreated(AudioInputController* controller) = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment