summaryrefslogtreecommitdiffstats
path: root/base/win
diff options
context:
space:
mode:
authorrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-28 23:48:44 +0000
committerrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-28 23:48:44 +0000
commit9493ee95cd8475d2ce39276fddca3b4b3d3ae73e (patch)
treec9888c464ba0261f5daf7caaa6534c5510a12289 /base/win
parent34ca58555bb67f8f72b84ba07b5c935928e2db3d (diff)
downloadchromium_src-9493ee95cd8475d2ce39276fddca3b4b3d3ae73e.zip
chromium_src-9493ee95cd8475d2ce39276fddca3b4b3d3ae73e.tar.gz
chromium_src-9493ee95cd8475d2ce39276fddca3b4b3d3ae73e.tar.bz2
Base: Last set of files to use BASE_API (for base.dll)
Note that a bunck of these files have no unit tests :( BUG=76996 TEST=none Review URL: http://codereview.chromium.org/6747014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79633 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/win')
-rw-r--r--base/win/event_trace_controller.h8
-rw-r--r--base/win/event_trace_provider.h6
-rw-r--r--base/win/i18n.h9
-rw-r--r--base/win/object_watcher.h3
-rw-r--r--base/win/registry.h7
-rw-r--r--base/win/scoped_bstr.h5
-rw-r--r--base/win/scoped_variant.h5
-rw-r--r--base/win/win_util.h29
-rw-r--r--base/win/wrapped_window_proc.h7
9 files changed, 47 insertions, 32 deletions
diff --git a/base/win/event_trace_controller.h b/base/win/event_trace_controller.h
index 8eb172ed..6cc7e69 100644
--- a/base/win/event_trace_controller.h
+++ b/base/win/event_trace_controller.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 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.
//
@@ -25,6 +25,8 @@
#include <wmistr.h>
#include <evntrace.h>
#include <string>
+
+#include "base/base_api.h"
#include "base/basictypes.h"
namespace base {
@@ -33,7 +35,7 @@ namespace win {
// Utility class to make it easier to work with EVENT_TRACE_PROPERTIES.
// The EVENT_TRACE_PROPERTIES structure contains information about an
// event tracing session.
-class EtwTraceProperties {
+class BASE_API EtwTraceProperties {
public:
EtwTraceProperties();
@@ -83,7 +85,7 @@ class EtwTraceProperties {
// This class implements an ETW controller, which knows how to start and
// stop event tracing sessions, as well as controlling ETW provider
// log levels and enable bit masks under the session.
-class EtwTraceController {
+class BASE_API EtwTraceController {
public:
EtwTraceController();
~EtwTraceController();
diff --git a/base/win/event_trace_provider.h b/base/win/event_trace_provider.h
index 6614c91..7173025 100644
--- a/base/win/event_trace_provider.h
+++ b/base/win/event_trace_provider.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 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.
//
@@ -11,6 +11,8 @@
#include <windows.h>
#include <wmistr.h>
#include <evntrace.h>
+
+#include "base/base_api.h"
#include "base/basictypes.h"
namespace base {
@@ -80,7 +82,7 @@ template <size_t N> class EtwMofEvent: public EtwMofEventBase<N> {
// a particular trace level, and whether particular enable flags are set,
// before other resources are consumed to generate and issue the log
// messages themselves.
-class EtwTraceProvider {
+class BASE_API EtwTraceProvider {
public:
// Creates an event trace provider identified by provider_name, which
// will be the name registered with Event Tracing for Windows (ETW).
diff --git a/base/win/i18n.h b/base/win/i18n.h
index ba0f74d..0159fd0 100644
--- a/base/win/i18n.h
+++ b/base/win/i18n.h
@@ -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.
@@ -9,6 +9,7 @@
#include <string>
#include <vector>
+#include "base/base_api.h"
#include "base/basictypes.h"
namespace base {
@@ -18,12 +19,14 @@ namespace i18n {
// Adds to |languages| the list of user preferred UI languages from MUI, if
// available, falling-back on the user default UI language otherwise. Returns
// true if at least one language is added.
-bool GetUserPreferredUILanguageList(std::vector<std::wstring>* languages);
+BASE_API bool GetUserPreferredUILanguageList(
+ std::vector<std::wstring>* languages);
// Adds to |languages| the list of thread, process, user, and system preferred
// UI languages from MUI, if available, falling-back on the user default UI
// language otherwise. Returns true if at least one language is added.
-bool GetThreadPreferredUILanguageList(std::vector<std::wstring>* languages);
+BASE_API bool GetThreadPreferredUILanguageList(
+ std::vector<std::wstring>* languages);
} // namespace i18n
} // namespace win
diff --git a/base/win/object_watcher.h b/base/win/object_watcher.h
index 16534c2..0eef022 100644
--- a/base/win/object_watcher.h
+++ b/base/win/object_watcher.h
@@ -8,6 +8,7 @@
#include <windows.h>
+#include "base/base_api.h"
#include "base/message_loop.h"
namespace base {
@@ -41,7 +42,7 @@ namespace win {
// scope, the watcher_ will be destroyed, and there is no need to worry about
// OnObjectSignaled being called on a deleted MyClass pointer. Easy!
//
-class ObjectWatcher : public MessageLoop::DestructionObserver {
+class BASE_API ObjectWatcher : public MessageLoop::DestructionObserver {
public:
class Delegate {
public:
diff --git a/base/win/registry.h b/base/win/registry.h
index cd5421d..86785cfa 100644
--- a/base/win/registry.h
+++ b/base/win/registry.h
@@ -9,6 +9,7 @@
#include <windows.h>
#include <string>
+#include "base/base_api.h"
#include "base/basictypes.h"
namespace base {
@@ -21,7 +22,7 @@ namespace win {
// Note:
// ReadValue family of functions guarantee that the return arguments
// are not touched in case of failure.
-class RegKey {
+class BASE_API RegKey {
public:
RegKey();
RegKey(HKEY rootkey, const wchar_t* subkey, REGSAM access);
@@ -98,7 +99,7 @@ class RegKey {
// For this application I happen to know I wont need data size larger
// than MAX_PATH, but in real life this wouldn't neccessarily be
// adequate.
-class RegistryValueIterator {
+class BASE_API RegistryValueIterator {
public:
RegistryValueIterator(HKEY root_key, const wchar_t* folder_key);
@@ -138,7 +139,7 @@ class RegistryValueIterator {
DISALLOW_COPY_AND_ASSIGN(RegistryValueIterator);
};
-class RegistryKeyIterator {
+class BASE_API RegistryKeyIterator {
public:
RegistryKeyIterator(HKEY root_key, const wchar_t* folder_key);
diff --git a/base/win/scoped_bstr.h b/base/win/scoped_bstr.h
index 944562e..61b8969 100644
--- a/base/win/scoped_bstr.h
+++ b/base/win/scoped_bstr.h
@@ -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.
@@ -9,6 +9,7 @@
#include <windows.h>
#include <oleauto.h>
+#include "base/base_api.h"
#include "base/logging.h"
#include "base/string16.h"
@@ -17,7 +18,7 @@ namespace win {
// Manages a BSTR string pointer.
// The class interface is based on scoped_ptr.
-class ScopedBstr {
+class BASE_API ScopedBstr {
public:
ScopedBstr() : bstr_(NULL) {
}
diff --git a/base/win/scoped_variant.h b/base/win/scoped_variant.h
index 6c4d23f..11ffa3e 100644
--- a/base/win/scoped_variant.h
+++ b/base/win/scoped_variant.h
@@ -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.
@@ -9,6 +9,7 @@
#include <windows.h>
#include <oleauto.h>
+#include "base/base_api.h"
#include "base/basictypes.h"
namespace base {
@@ -20,7 +21,7 @@ namespace win {
// Instead of inheriting from VARIANT, we take the containment approach
// in order to have more control over the usage of the variant and guard
// against memory leaks.
-class ScopedVariant {
+class BASE_API ScopedVariant {
public:
// Declaration of a global variant variable that's always VT_EMPTY
static const VARIANT kEmptyVariant;
diff --git a/base/win/win_util.h b/base/win/win_util.h
index c9bdce80..847c434 100644
--- a/base/win/win_util.h
+++ b/base/win/win_util.h
@@ -27,6 +27,7 @@
#include <string>
+#include "base/base_api.h"
#include "base/string16.h"
struct IPropertyStore;
@@ -36,19 +37,19 @@ typedef _tagpropertykey PROPERTYKEY;
namespace base {
namespace win {
-void GetNonClientMetrics(NONCLIENTMETRICS* metrics);
+BASE_API void GetNonClientMetrics(NONCLIENTMETRICS* metrics);
// Returns the string representing the current user sid.
-bool GetUserSidString(std::wstring* user_sid);
+BASE_API bool GetUserSidString(std::wstring* user_sid);
// Returns true if the shift key is currently pressed.
-bool IsShiftPressed();
+BASE_API bool IsShiftPressed();
// Returns true if the ctrl key is currently pressed.
-bool IsCtrlPressed();
+BASE_API bool IsCtrlPressed();
// Returns true if the alt key is currently pressed.
-bool IsAltPressed();
+BASE_API bool IsAltPressed();
// Returns false if user account control (UAC) has been disabled with the
// EnableLUA registry flag. Returns true if user account control is enabled.
@@ -56,27 +57,27 @@ bool IsAltPressed();
// machines, might still exist and be set to 0 (UAC disabled), in which case
// this function will return false. You should therefore check this flag only
// if the OS is Vista or later.
-bool UserAccountControlIsEnabled();
+BASE_API bool UserAccountControlIsEnabled();
// Sets the application id in given IPropertyStore. The function is intended
// for tagging application/chromium shortcut, browser window and jump list for
// Win7.
-bool SetAppIdForPropertyStore(IPropertyStore* property_store,
- const wchar_t* app_id);
+BASE_API bool SetAppIdForPropertyStore(IPropertyStore* property_store,
+ const wchar_t* app_id);
// Adds the specified |command| using the specified |name| to the AutoRun key.
// |root_key| could be HKCU or HKLM or the root of any user hive.
-bool AddCommandToAutoRun(HKEY root_key, const string16& name,
- const string16& command);
+BASE_API bool AddCommandToAutoRun(HKEY root_key, const string16& name,
+ const string16& command);
// Removes the command specified by |name| from the AutoRun key. |root_key|
// could be HKCU or HKLM or the root of any user hive.
-bool RemoveCommandFromAutoRun(HKEY root_key, const string16& name);
+BASE_API bool RemoveCommandFromAutoRun(HKEY root_key, const string16& name);
// Reads the command specified by |name| from the AutoRun key. |root_key|
// could be HKCU or HKLM or the root of any user hive. Used for unit-tests.
-bool ReadCommandFromAutoRun(HKEY root_key,
- const string16& name,
- string16* command);
+BASE_API bool ReadCommandFromAutoRun(HKEY root_key,
+ const string16& name,
+ string16* command);
} // namespace win
} // namespace base
diff --git a/base/win/wrapped_window_proc.h b/base/win/wrapped_window_proc.h
index 0515044..eac150e 100644
--- a/base/win/wrapped_window_proc.h
+++ b/base/win/wrapped_window_proc.h
@@ -13,6 +13,8 @@
#include <windows.h>
+#include "base/base_api.h"
+
namespace base {
namespace win {
@@ -26,10 +28,11 @@ typedef int (__cdecl *WinProcExceptionFilter)(EXCEPTION_POINTERS* info);
// Sets the filter to deal with exceptions inside a WindowProc. Returns the old
// exception filter, if any.
// This function should be called before any window is created.
-WinProcExceptionFilter SetWinProcExceptionFilter(WinProcExceptionFilter filter);
+BASE_API WinProcExceptionFilter SetWinProcExceptionFilter(
+ WinProcExceptionFilter filter);
// Calls the registered exception filter.
-int CallExceptionFilter(EXCEPTION_POINTERS* info);
+BASE_API int CallExceptionFilter(EXCEPTION_POINTERS* info);
// Wrapper that supplies a standard exception frame for the provided WindowProc.
// The normal usage is something like this: