summaryrefslogtreecommitdiffstats
path: root/views/widget
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-28 06:32:33 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-28 06:32:33 +0000
commit6827766b1fcc5885b7a8bc8c707e283f71f46f09 (patch)
tree11dc18b19363119d8ab06faf6521b8d6d4d94d52 /views/widget
parentce681a8b14c05752f9279e7ed945943506f7d628 (diff)
downloadchromium_src-6827766b1fcc5885b7a8bc8c707e283f71f46f09.zip
chromium_src-6827766b1fcc5885b7a8bc8c707e283f71f46f09.tar.gz
chromium_src-6827766b1fcc5885b7a8bc8c707e283f71f46f09.tar.bz2
Create views.dll / libviews.so
R=sky@chromium.org,rvargas@chromium.org Review URL: http://codereview.chromium.org/7493017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94428 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/widget')
-rw-r--r--views/widget/default_theme_provider.h5
-rw-r--r--views/widget/monitor_win.h4
-rw-r--r--views/widget/native_widget.h2
-rw-r--r--views/widget/native_widget_delegate.h4
-rw-r--r--views/widget/native_widget_gtk.h6
-rw-r--r--views/widget/native_widget_private.h2
-rw-r--r--views/widget/native_widget_view.h2
-rw-r--r--views/widget/native_widget_views.h4
-rw-r--r--views/widget/native_widget_win.h14
-rw-r--r--views/widget/root_view.h11
-rw-r--r--views/widget/tooltip_manager.h5
-rw-r--r--views/widget/widget.h6
-rw-r--r--views/widget/widget_delegate.h5
13 files changed, 36 insertions, 34 deletions
diff --git a/views/widget/default_theme_provider.h b/views/widget/default_theme_provider.h
index 9d0ec52..3b96e32 100644
--- a/views/widget/default_theme_provider.h
+++ b/views/widget/default_theme_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.
@@ -10,6 +10,7 @@
#include "base/basictypes.h"
#include "ui/base/theme_provider.h"
+#include "views/views_api.h"
class Profile;
@@ -20,7 +21,7 @@ using ui::ResourceBundle;
namespace views {
-class DefaultThemeProvider : public ui::ThemeProvider {
+class VIEWS_API DefaultThemeProvider : public ui::ThemeProvider {
public:
DefaultThemeProvider();
virtual ~DefaultThemeProvider();
diff --git a/views/widget/monitor_win.h b/views/widget/monitor_win.h
index b1cdf24..e50ab89 100644
--- a/views/widget/monitor_win.h
+++ b/views/widget/monitor_win.h
@@ -6,6 +6,8 @@
#define VIEWS_WIDGET_MONITOR_WIN_H_
#pragma once
+#include "views/views_api.h"
+
namespace gfx {
class Rect;
}
@@ -14,7 +16,7 @@ namespace views {
// Returns the bounds for the monitor that contains the largest area of
// intersection with the specified rectangle.
-gfx::Rect GetMonitorBoundsForRect(const gfx::Rect& rect);
+VIEWS_API gfx::Rect GetMonitorBoundsForRect(const gfx::Rect& rect);
} // namespace views
diff --git a/views/widget/native_widget.h b/views/widget/native_widget.h
index 9ed37e7..866598e 100644
--- a/views/widget/native_widget.h
+++ b/views/widget/native_widget.h
@@ -23,7 +23,7 @@ class NativeWidgetPrivate;
// Widget's native_widget() accessor, which code occasionally static_casts to
// a known implementation in platform-specific code.
//
-class NativeWidget {
+class VIEWS_API NativeWidget {
public:
virtual ~NativeWidget() {}
diff --git a/views/widget/native_widget_delegate.h b/views/widget/native_widget_delegate.h
index 20456fb..7da3cc7 100644
--- a/views/widget/native_widget_delegate.h
+++ b/views/widget/native_widget_delegate.h
@@ -6,6 +6,8 @@
#define VIEWS_WIDGET_NATIVE_WIDGET_DELEGATE_H_
#pragma once
+#include "views/views_api.h"
+
namespace gfx {
class Canvas;
class Size;
@@ -26,7 +28,7 @@ namespace internal {
// An interface implemented by the object that handles events sent by a
// NativeWidget implementation.
//
-class NativeWidgetDelegate {
+class VIEWS_API NativeWidgetDelegate {
public:
virtual ~NativeWidgetDelegate() {}
diff --git a/views/widget/native_widget_gtk.h b/views/widget/native_widget_gtk.h
index 6d94f12..a6df8a9 100644
--- a/views/widget/native_widget_gtk.h
+++ b/views/widget/native_widget_gtk.h
@@ -41,9 +41,9 @@ class NativeWidgetDelegate;
}
// Widget implementation for GTK.
-class NativeWidgetGtk : public internal::NativeWidgetPrivate,
- public ui::ActiveWindowWatcherX::Observer,
- public internal::InputMethodDelegate {
+class VIEWS_API NativeWidgetGtk : public internal::NativeWidgetPrivate,
+ public ui::ActiveWindowWatcherX::Observer,
+ public internal::InputMethodDelegate {
public:
explicit NativeWidgetGtk(internal::NativeWidgetDelegate* delegate);
virtual ~NativeWidgetGtk();
diff --git a/views/widget/native_widget_private.h b/views/widget/native_widget_private.h
index baf85a4..0c40fbf 100644
--- a/views/widget/native_widget_private.h
+++ b/views/widget/native_widget_private.h
@@ -36,7 +36,7 @@ namespace internal {
// NativeWidget implementations. This file should not be included
// in code that does not fall into one of these use cases.
//
-class NativeWidgetPrivate : public NativeWidget {
+class VIEWS_API NativeWidgetPrivate : public NativeWidget {
public:
virtual ~NativeWidgetPrivate() {}
diff --git a/views/widget/native_widget_view.h b/views/widget/native_widget_view.h
index 61fa8a7..2f86edc 100644
--- a/views/widget/native_widget_view.h
+++ b/views/widget/native_widget_view.h
@@ -27,7 +27,7 @@ namespace internal {
// View hierarchy. It is responsible for receiving relevant events from that
// hierarchy and forwarding them to its NativeWidgetViews' delegate's hierarchy.
//
-class NativeWidgetView : public View {
+class VIEWS_API NativeWidgetView : public View {
public:
static const char kViewClassName[];
diff --git a/views/widget/native_widget_views.h b/views/widget/native_widget_views.h
index 4d421a1..ed46fb2 100644
--- a/views/widget/native_widget_views.h
+++ b/views/widget/native_widget_views.h
@@ -23,8 +23,8 @@ class NativeWidgetView;
//
// A NativeWidget implementation that uses another View as its native widget.
//
-class NativeWidgetViews : public internal::NativeWidgetPrivate,
- public internal::InputMethodDelegate {
+class VIEWS_API NativeWidgetViews : public internal::NativeWidgetPrivate,
+ public internal::InputMethodDelegate {
public:
explicit NativeWidgetViews(internal::NativeWidgetDelegate* delegate);
virtual ~NativeWidgetViews();
diff --git a/views/widget/native_widget_win.h b/views/widget/native_widget_win.h
index 930536b..c4b5916 100644
--- a/views/widget/native_widget_win.h
+++ b/views/widget/native_widget_win.h
@@ -48,9 +48,9 @@ class NativeWidgetDelegate;
// This is exposed only for testing
// Adjusts the value of |child_rect| if necessary to ensure that it is
// completely visible within |parent_rect|.
-void EnsureRectIsVisibleInRect(const gfx::Rect& parent_rect,
- gfx::Rect* child_rect,
- int padding);
+VIEWS_API void EnsureRectIsVisibleInRect(const gfx::Rect& parent_rect,
+ gfx::Rect* child_rect,
+ int padding);
} // namespace internal
// A Windows message reflected from other windows. This message is sent
@@ -85,10 +85,10 @@ const int WM_NCUAHDRAWFRAME = 0xAF;
// then responsible for cleaning up after it.
//
///////////////////////////////////////////////////////////////////////////////
-class NativeWidgetWin : public ui::WindowImpl,
- public internal::NativeWidgetPrivate,
- public MessageLoopForUI::Observer,
- public internal::InputMethodDelegate {
+class VIEWS_API NativeWidgetWin : public ui::WindowImpl,
+ public internal::NativeWidgetPrivate,
+ public MessageLoopForUI::Observer,
+ public internal::InputMethodDelegate {
public:
explicit NativeWidgetWin(internal::NativeWidgetDelegate* delegate);
virtual ~NativeWidgetWin();
diff --git a/views/widget/root_view.h b/views/widget/root_view.h
index 2b7935b..0dde54c 100644
--- a/views/widget/root_view.h
+++ b/views/widget/root_view.h
@@ -41,9 +41,9 @@ namespace internal {
// TODO(beng): Enforce no other callers to AddChildView/tree functions by
// overriding those methods as private here.
// TODO(beng): Clean up API further, make Widget a friend.
+// TODO(sky): We don't really want to export this class.
//
-class RootView : public View,
- public FocusTraversable {
+class VIEWS_API RootView : public View, public FocusTraversable {
public:
static const char kViewClassName[];
@@ -74,11 +74,8 @@ class RootView : public View,
// it. Returns whether anyone consumed the event.
bool OnKeyEvent(const KeyEvent& event);
-#if defined(UNIT_TEST)
- // For unit testing purposes, we use this method to set a mock
- // GestureManager
- void SetGestureManager(GestureManager* g) { gesture_manager_ = g; }
-#endif
+ // Provided only for testing:
+ void SetGestureManagerForTesting(GestureManager* g) { gesture_manager_ = g; }
// Focus ---------------------------------------------------------------------
diff --git a/views/widget/tooltip_manager.h b/views/widget/tooltip_manager.h
index 4931557..28ca52d 100644
--- a/views/widget/tooltip_manager.h
+++ b/views/widget/tooltip_manager.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 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 "base/basictypes.h"
+#include "views/views_api.h"
namespace gfx {
class Font;
@@ -21,7 +22,7 @@ class View;
// TooltipManager takes care of the wiring to support tooltips for Views. You
// almost never need to interact directly with TooltipManager, rather look to
// the various tooltip methods on View.
-class TooltipManager {
+class VIEWS_API TooltipManager {
public:
// Returns the height of tooltips. This should only be invoked from within
// GetTooltipTextOrigin.
diff --git a/views/widget/widget.h b/views/widget/widget.h
index 883d86c..372b5a8 100644
--- a/views/widget/widget.h
+++ b/views/widget/widget.h
@@ -87,8 +87,8 @@ class RootView;
// the Widget it is responsible for destroying the NativeWidget (from its
// destructor).
//
-class Widget : public internal::NativeWidgetDelegate,
- public FocusTraversable {
+class VIEWS_API Widget : public internal::NativeWidgetDelegate,
+ public FocusTraversable {
public:
// Observers can listen to various events on the Widgets.
class Observer {
@@ -106,7 +106,7 @@ class Widget : public internal::NativeWidgetDelegate,
FRAME_TYPE_FORCE_NATIVE // Force the native frame.
};
- struct InitParams {
+ struct VIEWS_API InitParams {
enum Type {
TYPE_WINDOW, // A decorated Window, like a frame window.
// Widgets of TYPE_WINDOW will have a NonClientView.
diff --git a/views/widget/widget_delegate.h b/views/widget/widget_delegate.h
index 8dc21bc..450aba7 100644
--- a/views/widget/widget_delegate.h
+++ b/views/widget/widget_delegate.h
@@ -27,7 +27,7 @@ class Widget;
// WidgetDelegate interface
// Handles events on Widgets in context-specific ways.
-class WidgetDelegate {
+class VIEWS_API WidgetDelegate {
public:
WidgetDelegate();
@@ -159,8 +159,7 @@ class WidgetDelegate {
// A WidgetDelegate implementation that is-a View. Used to override GetWidget()
// to call View's GetWidget() for the common case where a WidgetDelegate
// implementation is-a View.
-class WidgetDelegateView : public WidgetDelegate,
- public View {
+class VIEWS_API WidgetDelegateView : public WidgetDelegate, public View {
public:
WidgetDelegateView();
virtual ~WidgetDelegateView();