Skip to content

Commit

Permalink
Create views.dll / libviews.so
Browse files Browse the repository at this point in the history
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
  • Loading branch information
darin@chromium.org committed Jul 28, 2011
1 parent ce681a8 commit 6827766
Show file tree
Hide file tree
Showing 116 changed files with 341 additions and 247 deletions.
4 changes: 2 additions & 2 deletions base/message_pump_win.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class BASE_API MessagePumpWin : public MessagePump {
//
// NOTE: An Observer implementation should be extremely fast!
//
class Observer {
class BASE_API Observer {
public:
virtual ~Observer() {}

Expand All @@ -50,7 +50,7 @@ class BASE_API MessagePumpWin : public MessagePump {
//
// The nested loop is exited by either posting a quit, or returning false
// from Dispatch.
class Dispatcher {
class BASE_API Dispatcher {
public:
virtual ~Dispatcher() {}
// Dispatches the event. If true is returned processing continues as
Expand Down
2 changes: 2 additions & 0 deletions chrome/browser/aeropeek_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
#include "ui/gfx/icon_util.h"
#include "views/widget/native_widget_win.h"

#pragma comment(lib, "dwmapi.lib")

namespace {

// Macros and COM interfaces used in this file.
Expand Down
2 changes: 2 additions & 0 deletions chrome/browser/ui/views/frame/browser_frame_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
#include "views/widget/widget.h"
#include "views/window/non_client_view.h"

#pragma comment(lib, "dwmapi.lib")

// static
static const int kClientEdgeThickness = 3;
static const int kTabDragWindowAlpha = 200;
Expand Down
4 changes: 3 additions & 1 deletion ui/base/animation/animation_container_observer.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@
#define UI_BASE_ANIMATION_ANIMATION_CONTAINER_OBSERVER_H_
#pragma once

#include "ui/ui_api.h"

namespace ui {

class AnimationContainer;

// The observer is notified after every update of the animations managed by
// the container.
class AnimationContainerObserver {
class UI_API AnimationContainerObserver {
public:
// Invoked on every tick of the timer managed by the container and after
// all the animations have updated.
Expand Down
4 changes: 3 additions & 1 deletion ui/base/animation/animation_delegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#define UI_BASE_ANIMATION_ANIMATION_DELEGATE_H_
#pragma once

#include "ui/ui_api.h"

namespace ui {

class Animation;
Expand All @@ -14,7 +16,7 @@ class Animation;
//
// Implement this interface when you want to receive notifications about the
// state of an animation.
class AnimationDelegate {
class UI_API AnimationDelegate {
public:
// Called when an animation has completed.
virtual void AnimationEnded(const Animation* animation) {}
Expand Down
3 changes: 2 additions & 1 deletion ui/base/models/accelerator.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@
#pragma once

#include "ui/base/keycodes/keyboard_codes.h"
#include "ui/ui_api.h"

namespace ui {

// This is a cross-platform base class for accelerator keys used in menus. It is
// meant to be subclassed for concrete toolkit implementations.
class Accelerator {
class UI_API Accelerator {
public:
Accelerator() : key_code_(ui::VKEY_UNKNOWN), modifiers_(0) {}

Expand Down
4 changes: 3 additions & 1 deletion ui/base/models/table_model_observer.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@
#define UI_BASE_MODELS_TABLE_MODEL_OBSERVER_H_
#pragma once

#include "ui/ui_api.h"

namespace ui {

// Observer for a TableModel. Anytime the model changes, it must notify its
// observer.
class TableModelObserver {
class UI_API TableModelObserver {
public:
// Invoked when the model has been completely changed.
virtual void OnModelChanged() = 0;
Expand Down
2 changes: 1 addition & 1 deletion ui/base/models/tree_model.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class TreeModelNode {
};

// Observer for the TreeModel. Notified of significant events to the model.
class TreeModelObserver {
class UI_API TreeModelObserver {
public:
// Notification that nodes were added to the specified parent.
virtual void TreeNodesAdded(TreeModel* model,
Expand Down
11 changes: 11 additions & 0 deletions ui/base/ui_base_exports.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// 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.

// This file is for including headers that are not included in any other .cc
// files contained with the ui module. We need to include these here so that
// linker will know to include the symbols, defined by these headers, in the
// resulting dynamic library (ui.dll).

#include "ui/base/models/accelerator.h"
#include "ui/base/models/table_model_observer.h"
2 changes: 2 additions & 0 deletions ui/ui.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@
'base/text/text_elider.h',
'base/theme_provider.cc',
'base/theme_provider.h',
'base/ui_base_exports.cc',
'base/ui_base_paths.cc',
'base/ui_base_paths.h',
'base/ui_base_switches.cc',
Expand Down Expand Up @@ -273,6 +274,7 @@
'gfx/skia_utils_gtk.h',
'gfx/transform.h',
'gfx/transform.cc',
'ui_api.h',
],
'conditions': [
['toolkit_uses_gtk == 1', {
Expand Down
2 changes: 1 addition & 1 deletion ui/ui_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#define UI_API __declspec(dllexport)
#else
#define UI_API __declspec(dllimport)
#endif // defined(UI_BASE_IMPLEMENTATION)
#endif // defined(UI_IMPLEMENTATION)

#else // defined(WIN32)
#define UI_API __attribute__((visibility("default")))
Expand Down
7 changes: 4 additions & 3 deletions views/accelerator.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 @@ -17,10 +17,11 @@
#include "base/string16.h"
#include "ui/base/models/accelerator.h"
#include "views/events/event.h"
#include "views/views_api.h"

namespace views {

class Accelerator : public ui::Accelerator {
class VIEWS_API Accelerator : public ui::Accelerator {
public:
Accelerator() : ui::Accelerator() {}

Expand Down Expand Up @@ -59,7 +60,7 @@ class Accelerator : public ui::Accelerator {

// An interface that classes that want to register for keyboard accelerators
// should implement.
class AcceleratorTarget {
class VIEWS_API AcceleratorTarget {
public:
// This method should return true if the accelerator was processed.
virtual bool AcceleratorPressed(const Accelerator& accelerator) = 0;
Expand Down
5 changes: 3 additions & 2 deletions views/animation/bounds_animator.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "ui/base/animation/animation_container_observer.h"
#include "ui/base/animation/animation_delegate.h"
#include "ui/gfx/rect.h"
#include "views/views_api.h"

namespace ui {
class SlideAnimation;
Expand All @@ -38,8 +39,8 @@ class BoundsAnimatorObserver {
// You can attach an AnimationDelegate to the individual animation for a view
// by way of SetAnimationDelegate. Additionally you can attach an observer to
// the BoundsAnimator that is notified when all animations are complete.
class BoundsAnimator : public ui::AnimationDelegate,
public ui::AnimationContainerObserver {
class VIEWS_API BoundsAnimator : public ui::AnimationDelegate,
public ui::AnimationContainerObserver {
public:
// If |delete_when_done| is set to true in |SetAnimationDelegate| the
// |AnimationDelegate| must subclass this class.
Expand Down
3 changes: 2 additions & 1 deletion views/background.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

#include "base/basictypes.h"
#include "third_party/skia/include/core/SkColor.h"
#include "views/views_api.h"

namespace gfx {
class Canvas;
Expand All @@ -36,7 +37,7 @@ class View;
// View::OnPaintBackground()
//
/////////////////////////////////////////////////////////////////////////////
class Background {
class VIEWS_API Background {
public:
Background();
virtual ~Background();
Expand Down
4 changes: 2 additions & 2 deletions views/border.h
Original file line number Diff line number Diff line change
@@ -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.

Expand Down Expand Up @@ -34,7 +34,7 @@ class View;
//
////////////////////////////////////////////////////////////////////////////////

class Border {
class VIEWS_API Border {
public:
Border();
virtual ~Border();
Expand Down
4 changes: 3 additions & 1 deletion views/context_menu_controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#define VIEWS_CONTEXT_MENU_CONTROLLER_H_
#pragma once

#include "views/views_api.h"

namespace gfx {
class Point;
}
Expand All @@ -24,7 +26,7 @@ class View;
// It is up to subclasses that do their own mouse processing to invoke
// the appropriate ContextMenuController method, typically by invoking super's
// implementation for mouse processing.
class ContextMenuController {
class VIEWS_API ContextMenuController {
public:
// Invoked to show the context menu for the source view. If |is_mouse_gesture|
// is true, |p| is the location of the mouse. If |is_mouse_gesture| is false,
Expand Down
6 changes: 3 additions & 3 deletions views/controls/button/button.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 @@ -15,7 +15,7 @@ class Event;

// An interface implemented by an object to let it know that a button was
// pressed.
class ButtonListener {
class VIEWS_API ButtonListener {
public:
virtual void ButtonPressed(Button* sender, const views::Event& event) = 0;

Expand All @@ -25,7 +25,7 @@ class ButtonListener {

// A View representing a button. Depending on the specific type, the button
// could be implemented by a native control or custom rendered.
class Button : public View {
class VIEWS_API Button : public View {
public:
virtual ~Button();

Expand Down
2 changes: 1 addition & 1 deletion views/controls/button/button_dropdown.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace views {
// display a menu
//
////////////////////////////////////////////////////////////////////////////////
class ButtonDropDown : public ImageButton {
class VIEWS_API ButtonDropDown : public ImageButton {
public:
// The button's class name.
static const char kViewClassName[];
Expand Down
2 changes: 1 addition & 1 deletion views/controls/button/checkbox.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace views {

// A native themed class representing a checkbox. This class does not use
// platform specific objects to replicate the native platforms looks and feel.
class Checkbox : public TextButtonBase {
class VIEWS_API Checkbox : public TextButtonBase {
public:
// The button's class name.
static const char kViewClassName[];
Expand Down
4 changes: 2 additions & 2 deletions views/controls/button/custom_button.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ namespace views {
// Note that this type of button is not focusable by default and will not be
// part of the focus chain. Call set_focusable(true) to make it part of the
// focus chain.
class CustomButton : public Button,
public ui::AnimationDelegate {
class VIEWS_API CustomButton : public Button,
public ui::AnimationDelegate {
public:
// The menu button's class name.
static const char kViewClassName[];
Expand Down
4 changes: 2 additions & 2 deletions views/controls/button/image_button.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace views {
// part of the focus chain. Call set_focusable(true) to make it part of the
// focus chain.

class ImageButton : public CustomButton {
class VIEWS_API ImageButton : public CustomButton {
public:
explicit ImageButton(ButtonListener* listener);
virtual ~ImageButton();
Expand Down Expand Up @@ -79,7 +79,7 @@ class ImageButton : public CustomButton {
// A toggle-able ImageButton. It swaps out its graphics when toggled.
//
////////////////////////////////////////////////////////////////////////////////
class ToggleImageButton : public ImageButton {
class VIEWS_API ToggleImageButton : public ImageButton {
public:
explicit ToggleImageButton(ButtonListener* listener);
virtual ~ToggleImageButton();
Expand Down
2 changes: 1 addition & 1 deletion views/controls/button/menu_button.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class ViewMenuDelegate;
// A button that shows a menu when the left mouse button is pushed
//
////////////////////////////////////////////////////////////////////////////////
class MenuButton : public TextButton {
class VIEWS_API MenuButton : public TextButton {
public:
// The menu button's class name.
static const char kViewClassName[];
Expand Down
2 changes: 1 addition & 1 deletion views/controls/button/radio_button.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace views {

// A native themed class representing a radio button. This class does not use
// platform specific objects to replicate the native platforms looks and feel.
class RadioButton : public Checkbox {
class VIEWS_API RadioButton : public Checkbox {
public:
// The button's class name.
static const char kViewClassName[];
Expand Down
11 changes: 6 additions & 5 deletions views/controls/button/text_button.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace views {
// focus chain.
//
////////////////////////////////////////////////////////////////////////////////
class TextButtonBorder : public Border {
class VIEWS_API TextButtonBorder : public Border {
public:
TextButtonBorder();
virtual ~TextButtonBorder();
Expand Down Expand Up @@ -90,7 +90,7 @@ class TextButtonBorder : public Border {
// states, with possible animation between states.
//
////////////////////////////////////////////////////////////////////////////////
class TextButtonNativeThemeBorder : public Border {
class VIEWS_API TextButtonNativeThemeBorder : public Border {
public:
TextButtonNativeThemeBorder(NativeThemeDelegate* delegate);
virtual ~TextButtonNativeThemeBorder();
Expand All @@ -117,7 +117,8 @@ class TextButtonNativeThemeBorder : public Border {
// passed to SetText. To reset the cached max size invoke ClearMaxTextSize.
//
////////////////////////////////////////////////////////////////////////////////
class TextButtonBase : public CustomButton, public NativeThemeDelegate {
class VIEWS_API TextButtonBase : public CustomButton,
public NativeThemeDelegate {
public:
// The menu button's class name.
static const char kViewClassName[];
Expand Down Expand Up @@ -313,7 +314,7 @@ class TextButtonBase : public CustomButton, public NativeThemeDelegate {
// passed to SetText. To reset the cached max size invoke ClearMaxTextSize.
//
////////////////////////////////////////////////////////////////////////////////
class TextButton : public TextButtonBase {
class VIEWS_API TextButton : public TextButtonBase {
public:
// The button's class name.
static const char kViewClassName[];
Expand Down Expand Up @@ -398,7 +399,7 @@ class TextButton : public TextButtonBase {
// like ignore-minimize-size and text alignment minimum size.
//
////////////////////////////////////////////////////////////////////////////////
class NativeTextButton : public TextButton {
class VIEWS_API NativeTextButton : public TextButton {
public:
// The button's class name.
static const char kViewClassName[];
Expand Down
Loading

0 comments on commit 6827766

Please sign in to comment.