Skip to content

Commit

Permalink
Annotate all of the functions in content that need to be exported, in…
Browse files Browse the repository at this point in the history
… preparation for creating a content shared library.

R=darin@chromium.org, jam@chromium.org, willchan@chromium.org
BUG=90442
TEST=everything still compiles

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100975 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
dpranke@chromium.org committed Sep 13, 2011
1 parent 8ea5d4b commit 8d128d6
Show file tree
Hide file tree
Showing 142 changed files with 570 additions and 354 deletions.
13 changes: 7 additions & 6 deletions content/app/content_main.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#pragma once

#include "build/build_config.h"
#include "content/common/content_export.h"

#if defined(OS_WIN)
#include <windows.h>
Expand All @@ -28,13 +29,13 @@ class ContentMainDelegate;

// |sandbox_info| should be initialized using InitializeSandboxInfo from
// content_main_win.h
int ContentMain(HINSTANCE instance,
sandbox::SandboxInterfaceInfo* sandbox_info,
ContentMainDelegate* delegate);
CONTENT_EXPORT int ContentMain(HINSTANCE instance,
sandbox::SandboxInterfaceInfo* sandbox_info,
ContentMainDelegate* delegate);
#else
int ContentMain(int argc,
const char** argv,
ContentMainDelegate* delegate);
CONTENT_EXPORT int ContentMain(int argc,
char** argv,
ContentMainDelegate* delegate);
#endif

} // namespace content
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "base/hash_tables.h"
#include "base/memory/scoped_ptr.h"
#include "build/build_config.h"
#include "content/common/content_export.h"
#include "ui/gfx/native_widget_types.h"
#include "webkit/glue/webaccessibility.h"

Expand All @@ -24,7 +25,7 @@ using webkit_glue::WebAccessibility;
struct ViewHostMsg_AccessibilityNotification_Params;

// Class that can perform actions on behalf of the BrowserAccessibilityManager.
class BrowserAccessibilityDelegate {
class CONTENT_EXPORT BrowserAccessibilityDelegate {
public:
virtual ~BrowserAccessibilityDelegate() {}
virtual void SetAccessibilityFocus(int acc_obj_id) = 0;
Expand Down
5 changes: 3 additions & 2 deletions content/browser/accessibility/browser_accessibility_state.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// 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
// found in the LICENSE file.

Expand All @@ -7,6 +7,7 @@
#pragma once

#include "base/basictypes.h"
#include "content/common/content_export.h"

template <typename T> struct DefaultSingletonTraits;

Expand All @@ -27,7 +28,7 @@ template <typename T> struct DefaultSingletonTraits;
// when VoiceOver is launched and unset when VoiceOver is closed. This is an
// improvement over reading defaults preference values (which has no callback
// mechanism).
class BrowserAccessibilityState {
class CONTENT_EXPORT BrowserAccessibilityState {
public:
// Returns the singleton instance.
static BrowserAccessibilityState* GetInstance();
Expand Down
13 changes: 10 additions & 3 deletions content/browser/appcache/chrome_appcache_service.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
#define CONTENT_BROWSER_APPCACHE_CHROME_APPCACHE_SERVICE_H_
#pragma once

#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
#include "content/browser/browser_thread.h"
#include "content/common/content_export.h"
#include "content/common/notification_observer.h"
#include "content/common/notification_registrar.h"
#include "webkit/appcache/appcache_policy.h"
Expand All @@ -28,11 +30,14 @@ class ResourceContext;
//
// All methods, except the ctor, are expected to be called on
// the IO thread (unless specifically called out in doc comments).
class ChromeAppCacheService
//
// TODO(dpranke): Fix dependencies on AppCacheService so that we don't have
// to worry about clients calling AppCacheService methods.
class CONTENT_EXPORT ChromeAppCacheService
: public base::RefCountedThreadSafe<ChromeAppCacheService,
BrowserThread::DeleteOnIOThread>,
public appcache::AppCacheService,
public appcache::AppCachePolicy,
NON_EXPORTED_BASE(public appcache::AppCacheService),
NON_EXPORTED_BASE(public appcache::AppCachePolicy),
public NotificationObserver {
public:
explicit ChromeAppCacheService(quota::QuotaManagerProxy* proxy);
Expand All @@ -43,6 +48,8 @@ class ChromeAppCacheService
scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy);

private:
friend class base::RefCountedThreadSafe<ChromeAppCacheService,
BrowserThread::DeleteOnIOThread>;
friend class BrowserThread;
friend class DeleteTask<ChromeAppCacheService>;

Expand Down
10 changes: 6 additions & 4 deletions content/browser/browser_child_process_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,17 @@
#include "content/browser/child_process_launcher.h"
#include "content/common/child_process_host.h"
#include "content/common/child_process_info.h"
#include "content/common/content_export.h"

// Plugins/workers and other child processes that live on the IO thread should
// derive from this class.
//
// [Browser]RenderProcessHost is the main exception that doesn't derive from
// this class. That project lives on the UI thread.
class BrowserChildProcessHost : public ChildProcessHost,
public ChildProcessInfo,
public ChildProcessLauncher::Client {
class CONTENT_EXPORT BrowserChildProcessHost :
public ChildProcessHost,
public ChildProcessInfo,
public ChildProcessLauncher::Client {
public:
virtual ~BrowserChildProcessHost();

Expand All @@ -31,7 +33,7 @@ class BrowserChildProcessHost : public ChildProcessHost,
// this should be done from the IO thread and that the iterator should not be
// kept around as it may be invalidated on subsequent event processing in the
// event loop.
class Iterator {
class CONTENT_EXPORT Iterator {
public:
Iterator();
explicit Iterator(ChildProcessInfo::ProcessType type);
Expand Down
6 changes: 4 additions & 2 deletions content/browser/browser_message_filter.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@

#include "base/process.h"
#include "content/browser/browser_thread.h"
#include "content/common/content_export.h"
#include "ipc/ipc_channel_proxy.h"

// Base class for message filters in the browser process. You can receive and
// send messages on any thread.
class BrowserMessageFilter : public IPC::ChannelProxy::MessageFilter,
public IPC::Message::Sender {
class CONTENT_EXPORT BrowserMessageFilter :
public IPC::ChannelProxy::MessageFilter,
public IPC::Message::Sender {
public:
BrowserMessageFilter();
virtual ~BrowserMessageFilter();
Expand Down
3 changes: 2 additions & 1 deletion content/browser/browser_thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "base/synchronization/lock.h"
#include "base/task.h"
#include "base/threading/thread.h"
#include "content/common/content_export.h"

#if defined(UNIT_TEST)
#include "base/logging.h"
Expand Down Expand Up @@ -39,7 +40,7 @@ class MessageLoopProxy;
// task is posted to is guaranteed to outlive the current thread, then no locks
// are used. You should never need to cache pointers to MessageLoops, since
// they're not thread safe.
class BrowserThread : public base::Thread {
class CONTENT_EXPORT BrowserThread : public base::Thread {
public:
// An enumeration of the well-known threads.
// NOTE: threads must be listed in the order of their life-time, with each
Expand Down
3 changes: 2 additions & 1 deletion content/browser/browser_url_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

#include "base/gtest_prod_util.h"
#include "base/memory/singleton.h"
#include "content/common/content_export.h"

class GURL;

Expand All @@ -27,7 +28,7 @@ class BrowserContext;

// BrowserURLHandler manages the list of all special URLs and manages
// dispatching the URL handling to registered handlers.
class BrowserURLHandler {
class CONTENT_EXPORT BrowserURLHandler {
public:
// The type of functions that can process a URL.
// If a handler handles |url|, it should :
Expand Down
4 changes: 3 additions & 1 deletion content/browser/browsing_instance.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#include "base/hash_tables.h"
#include "base/memory/ref_counted.h"
#include "content/common/content_export.h"

class GURL;
class SiteInstance;
Expand Down Expand Up @@ -55,7 +56,8 @@ class BrowserContext;
// site_instance_unittest.cc.
//
///////////////////////////////////////////////////////////////////////////////
class BrowsingInstance : public base::RefCounted<BrowsingInstance> {
class CONTENT_EXPORT BrowsingInstance
: public base::RefCounted<BrowsingInstance> {
public:
// Create a new BrowsingInstance.
explicit BrowsingInstance(content::BrowserContext* context);
Expand Down
5 changes: 3 additions & 2 deletions content/browser/cancelable_request.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
#include "base/synchronization/lock.h"
#include "base/task.h"
#include "build/build_config.h"
#include "content/common/content_export.h"

class CancelableRequestBase;
class CancelableRequestConsumerBase;
Expand All @@ -113,7 +114,7 @@ class CancelableRequestConsumerBase;
// It is intended that providers inherit from this class to provide the
// necessary functionality.

class CancelableRequestProvider {
class CONTENT_EXPORT CancelableRequestProvider {
public:
// Identifies a specific request from this provider.
typedef int Handle;
Expand Down Expand Up @@ -514,7 +515,7 @@ extern template class CancelableRequestConsumerT<int, 0>;
// other thread for the callback, but will still be destroyed properly.

// Non-templatized base class that provides cancellation
class CancelableRequestBase
class CONTENT_EXPORT CancelableRequestBase
: public base::RefCountedThreadSafe<CancelableRequestBase> {
public:
friend class CancelableRequestProvider;
Expand Down
3 changes: 2 additions & 1 deletion content/browser/cert_store.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

#include "base/memory/singleton.h"
#include "base/synchronization/lock.h"
#include "content/common/content_export.h"
#include "content/common/notification_observer.h"
#include "content/common/notification_registrar.h"
#include "net/base/x509_certificate.h"
Expand All @@ -24,7 +25,7 @@
// Note that the cert ids will overflow if we register more than 2^32 - 1 certs
// in 1 browsing session (which is highly unlikely to happen).

class CertStore : public NotificationObserver {
class CONTENT_EXPORT CertStore : public NotificationObserver {
public:
// Returns the singleton instance of the CertStore.
static CertStore* GetInstance();
Expand Down
5 changes: 3 additions & 2 deletions content/browser/child_process_launcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
#include "base/process_util.h"
#include "content/common/content_export.h"

class CommandLine;

// Launches a process asynchronously and notifies the client of the process
// handle when it's available. It's used to avoid blocking the calling thread
// on the OS since often it can take > 100 ms to create the process.
class ChildProcessLauncher {
class CONTENT_EXPORT ChildProcessLauncher {
public:
class Client {
class CONTENT_EXPORT Client {
public:
// Will be called on the thread that the ChildProcessLauncher was
// constructed on.
Expand Down
3 changes: 2 additions & 1 deletion content/browser/child_process_security_policy.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "base/gtest_prod_util.h"
#include "base/memory/singleton.h"
#include "base/synchronization/lock.h"
#include "content/common/content_export.h"

class FilePath;
class GURL;
Expand All @@ -26,7 +27,7 @@ class GURL;
//
// ChildProcessSecurityPolicy is a singleton that may be used on any thread.
//
class ChildProcessSecurityPolicy {
class CONTENT_EXPORT ChildProcessSecurityPolicy {
public:
// Object can only be created through GetInstance() so the constructor is
// private.
Expand Down
5 changes: 4 additions & 1 deletion content/browser/chrome_blob_storage_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "content/browser/browser_thread.h"
#include "content/common/content_export.h"

class GURL;

Expand All @@ -23,7 +24,7 @@ class BlobStorageController;
//
// All methods, except the ctor, are expected to be called on
// the IO thread (unless specifically called out in doc comments).
class ChromeBlobStorageContext
class CONTENT_EXPORT ChromeBlobStorageContext
: public base::RefCountedThreadSafe<ChromeBlobStorageContext,
BrowserThread::DeleteOnIOThread> {
public:
Expand All @@ -36,6 +37,8 @@ class ChromeBlobStorageContext
}

private:
friend class base::RefCountedThreadSafe<ChromeBlobStorageContext,
BrowserThread::DeleteOnIOThread>;
friend class BrowserThread;
friend class DeleteTask<ChromeBlobStorageContext>;

Expand Down
4 changes: 3 additions & 1 deletion content/browser/debugger/devtools_agent_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@
#define CONTENT_BROWSER_DEBUGGER_DEVTOOLS_AGENT_HOST_H_
#pragma once

#include "content/common/content_export.h"

namespace IPC {
class Message;
}

// Describes interface for managing devtools agents from the browser process.
class DevToolsAgentHost {
public:
class CloseListener {
class CONTENT_EXPORT CloseListener {
public:
virtual void AgentHostClosing(DevToolsAgentHost*) = 0;
protected:
Expand Down
5 changes: 3 additions & 2 deletions content/browser/debugger/devtools_client_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <vector>

#include "base/basictypes.h"
#include "content/common/content_export.h"

namespace IPC {
class Message;
Expand All @@ -21,9 +22,9 @@ class TabContents;
// Describes interface for managing devtools clients from browser process. There
// are currently two types of clients: devtools windows and TCP socket
// debuggers.
class DevToolsClientHost {
class CONTENT_EXPORT DevToolsClientHost {
public:
class CloseListener {
class CONTENT_EXPORT CloseListener {
public:
CloseListener() {}
virtual ~CloseListener() {}
Expand Down
5 changes: 3 additions & 2 deletions content/browser/debugger/devtools_http_protocol_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "content/common/content_export.h"
#include "net/server/http_server.h"
#include "net/url_request/url_request.h"

Expand Down Expand Up @@ -50,15 +51,15 @@ class DevToolsHttpProtocolHandler
};

// Takes ownership over |delegate|.
static scoped_refptr<DevToolsHttpProtocolHandler> Start(
CONTENT_EXPORT static scoped_refptr<DevToolsHttpProtocolHandler> Start(
const std::string& ip,
int port,
const std::string& frontend_url,
Delegate* delegate);

// Called from the main thread in order to stop protocol handler.
// Will schedule tear down task on IO thread.
void Stop();
CONTENT_EXPORT void Stop();

private:
friend class base::RefCountedThreadSafe<DevToolsHttpProtocolHandler>;
Expand Down
6 changes: 4 additions & 2 deletions content/browser/debugger/devtools_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

#include "content/browser/debugger/devtools_agent_host.h"
#include "content/browser/debugger/devtools_client_host.h"
#include "content/common/content_export.h"

namespace IPC {
class Message;
Expand All @@ -32,8 +33,9 @@ typedef std::map<std::string, std::string> DevToolsRuntimeProperties;
// Methods below that accept inspected RenderViewHost as a parameter are
// just convenience methods that call corresponding methods accepting
// DevToolAgentHost.
class DevToolsManager : public DevToolsClientHost::CloseListener,
public DevToolsAgentHost::CloseListener {
class CONTENT_EXPORT DevToolsManager
: public DevToolsClientHost::CloseListener,
public DevToolsAgentHost::CloseListener {
public:
static DevToolsManager* GetInstance();

Expand Down
Loading

0 comments on commit 8d128d6

Please sign in to comment.