Skip to content

Commit

Permalink
Introduce ui.dll / libui.so for the component build.
Browse files Browse the repository at this point in the history
R=ben@chromium.org
Review URL: http://codereview.chromium.org/7328011

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92819 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
darin@chromium.org committed Jul 17, 2011
1 parent 48c18de commit ea47b6a
Show file tree
Hide file tree
Showing 114 changed files with 1,083 additions and 889 deletions.
6 changes: 6 additions & 0 deletions build/common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -886,6 +886,12 @@
},
},
}],
# TODO(darin): Unfortunately, some third_party code depends on base/
[ 'OS=="win" and component=="shared_library"', {
'msvs_disabled_warnings': [
4251, # class 'std::xx' needs to have dll-interface.
],
}],
[ 'OS=="mac"', {
'xcode_settings': {
'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
Expand Down
6 changes: 6 additions & 0 deletions chrome/app/chrome_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@

#if defined(OS_WIN)
#include <algorithm>
#include <atlbase.h>
#include <malloc.h>
#include "base/string_util.h"
#include "base/win/registry.h"
Expand Down Expand Up @@ -773,6 +774,11 @@ int ChromeMain(int argc, char** argv) {
// done in all processes that work with these URLs (i.e. including renderers).
chrome::RegisterChromeSchemes();

#if defined(OS_WIN)
// TODO(darin): Kill this once http://crbug.com/52609 is fixed.
ResourceBundle::SetResourcesDataDLL(_AtlBaseModule.GetResourceInstance());
#endif

if (SubprocessNeedsResourceBundle(process_type)) {
// Initialize ResourceBundle which handles files loaded from external
// sources. The language should have been passed in to us from the
Expand Down
2 changes: 1 addition & 1 deletion chrome/chrome.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -1189,7 +1189,7 @@
'dependencies': [
'chrome_strings',
'../base/base.gyp:base',
'../ui/ui.gyp:ui_base',
'../ui/ui.gyp:ui',
],
'include_dirs': [
'<(grit_out_dir)',
Expand Down
2 changes: 1 addition & 1 deletion chrome/chrome_common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@
'../base/base.gyp:base_nacl_win64',
'../ipc/ipc.gyp:ipc_win64',
'../third_party/libxml/libxml.gyp:libxml',
'../ui/ui.gyp:ui_base_nacl_win64',
'../ui/ui.gyp:ui_nacl_win64',
'../ui/ui.gyp:ui_resources',
],
'include_dirs': [
Expand Down
2 changes: 1 addition & 1 deletion content/content_browser.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
'../third_party/speex/speex.gyp:libspeex',
'../third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:webkit',
'../third_party/zlib/zlib.gyp:zlib',
'../ui/ui.gyp:ui_base',
'../ui/ui.gyp:ui',
'../ui/ui.gyp:ui_resources',
'../webkit/support/webkit_support.gyp:webkit_resources',
'../webkit/support/webkit_support.gyp:webkit_strings',
Expand Down
2 changes: 1 addition & 1 deletion content/content_common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
'../third_party/npapi/npapi.gyp:npapi',
'../third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:webkit',
'../ui/gfx/gl/gl.gyp:gl',
'../ui/ui.gyp:ui_base',
'../ui/ui.gyp:ui',
'../webkit/support/webkit_support.gyp:appcache',
'../webkit/support/webkit_support.gyp:blob',
'../webkit/support/webkit_support.gyp:database',
Expand Down
2 changes: 2 additions & 0 deletions gpu/demos/demos.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
'../gpu.gyp:command_buffer_client',
'../gpu.gyp:command_buffer_service',
'../../base/base.gyp:base',
'../../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
'../../ui/ui.gyp:ui',
],
'sources': [
'framework/main_exe.cc',
Expand Down
1 change: 1 addition & 0 deletions gpu/gles2_conform_support/gles2_conform_support.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
'type': 'executable',
'dependencies': [
'egl_native',
'<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
'<(DEPTH)/gpu/gpu.gyp:gles2_c_lib_nocheck',
'<(DEPTH)/third_party/expat/expat.gyp:expat',
],
Expand Down
4 changes: 3 additions & 1 deletion gpu/gpu.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
'../base/base.gyp:base',
'../ui/gfx/gl/gl.gyp:gl',
'../ui/gfx/surface/surface.gyp:surface',
'../ui/ui.gyp:ui_gfx',
'../ui/ui.gyp:ui',
'../third_party/angle/src/build_angle.gyp:translator_glsl',
],
'sources': [
Expand Down Expand Up @@ -254,6 +254,7 @@
'target_name': 'gpu_unittests',
'type': 'executable',
'dependencies': [
'../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
'../testing/gmock.gyp:gmock',
'../testing/gmock.gyp:gmock_main',
'../testing/gtest.gyp:gtest',
Expand Down Expand Up @@ -371,6 +372,7 @@
'target_name': 'gles2_demo',
'type': 'executable',
'dependencies': [
'../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
'command_buffer_service',
'gles2_demo_lib',
],
Expand Down
2 changes: 1 addition & 1 deletion printing/printing.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
'../skia/skia.gyp:skia',
'../third_party/icu/icu.gyp:icui18n',
'../third_party/icu/icu.gyp:icuuc',
'../ui/ui.gyp:ui_base', # Only required for Font support.
'../ui/ui.gyp:ui', # Only required for Font support.
],
'include_dirs': [
'..',
Expand Down
4 changes: 2 additions & 2 deletions remoting/remoting.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@
'dependencies': [
'../base/base.gyp:base',
'../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
'../ui/ui.gyp:ui_gfx',
'../ui/ui.gyp:ui',
'../net/net.gyp:net',
'../third_party/protobuf/protobuf.gyp:protobuf_lite',
'../third_party/libvpx/libvpx.gyp:libvpx_include',
Expand Down Expand Up @@ -679,7 +679,7 @@
'../base/base.gyp:base_i18n',
'../base/base.gyp:test_support_base',
'../media/media.gyp:media',
'../ui/ui.gyp:ui_gfx',
'../ui/ui.gyp:ui',
'../testing/gmock.gyp:gmock',
'../testing/gtest.gyp:gtest',
],
Expand Down
2 changes: 1 addition & 1 deletion tools/imagediff/image_diff.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
'type': 'executable',
'dependencies': [
'../../base/base.gyp:base',
'../../ui/ui.gyp:ui_gfx',
'../../ui/ui.gyp:ui',
],
'sources': [
'image_diff.cc',
Expand Down
2 changes: 1 addition & 1 deletion tools/memory_watcher/memory_watcher.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
'type': 'shared_library',
'dependencies': [
'../../base/base.gyp:base',
'../../ui/ui.gyp:ui_base',
'../../ui/ui.gyp:ui',
],
'defines': [
'BUILD_MEMORY_WATCHER',
Expand Down
3 changes: 2 additions & 1 deletion ui/base/accessibility/accessible_view_state.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "base/basictypes.h"
#include "base/string16.h"
#include "ui/base/accessibility/accessibility_types.h"
#include "ui/ui_api.h"

namespace ui {

Expand All @@ -20,7 +21,7 @@ namespace ui {
// that should be provided about any UI view to assistive technology (AT).
//
////////////////////////////////////////////////////////////////////////////////
struct AccessibleViewState {
struct UI_API AccessibleViewState {
public:
AccessibleViewState();
~AccessibleViewState();
Expand Down
2 changes: 1 addition & 1 deletion ui/base/animation/animation.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class AnimationDelegate;
//
// To subclass override Step, which is invoked as the animation progresses and
// GetCurrentValue() to return the value appropriate to the animation.
class Animation : public AnimationContainerElement {
class UI_API Animation : public AnimationContainerElement {
public:
explicit Animation(base::TimeDelta timer_interval);
virtual ~Animation();
Expand Down
4 changes: 3 additions & 1 deletion ui/base/animation/animation_container.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "base/memory/ref_counted.h"
#include "base/time.h"
#include "base/timer.h"
#include "ui/ui_api.h"

namespace ui {

Expand All @@ -25,7 +26,8 @@ class AnimationContainerObserver;
//
// AnimationContainer is ref counted. Each Animation contained within the
// AnimationContainer own it.
class AnimationContainer : public base::RefCounted<AnimationContainer> {
class UI_API AnimationContainer
: public base::RefCounted<AnimationContainer> {
public:
AnimationContainer();

Expand Down
3 changes: 2 additions & 1 deletion ui/base/animation/animation_container_element.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@
#pragma once

#include "base/time.h"
#include "ui/ui_api.h"

namespace ui {

// Interface for the elements the AnimationContainer contains. This is
// implemented by Animation.
class AnimationContainerElement {
class UI_API AnimationContainerElement {
public:
// Sets the start of the animation. This is invoked from
// AnimationContainer::Start.
Expand Down
2 changes: 1 addition & 1 deletion ui/base/animation/linear_animation.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class AnimationDelegate;

// Linear time bounded animation. As the animation progresses AnimateToState is
// invoked.
class LinearAnimation : public Animation {
class UI_API LinearAnimation : public Animation {
public:
// Initializes everything except the duration.
//
Expand Down
2 changes: 1 addition & 1 deletion ui/base/animation/multi_animation.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace ui {
// To create a MultiAnimation pass in the parts, invoke Start() and the delegate
// is notified as the animation progresses. By default MultiAnimation runs until
// Stop is invoked, see |set_continuous()| for details.
class MultiAnimation : public Animation {
class UI_API MultiAnimation : public Animation {
public:
// Defines part of the animation. Each part consists of the following:
//
Expand Down
2 changes: 1 addition & 1 deletion ui/base/animation/slide_animation.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ namespace ui {
// private:
// scoped_ptr<SlideAnimation> animation_;
// }
class SlideAnimation : public LinearAnimation {
class UI_API SlideAnimation : public LinearAnimation {
public:
explicit SlideAnimation(AnimationDelegate* target);
virtual ~SlideAnimation();
Expand Down
2 changes: 1 addition & 1 deletion ui/base/animation/throb_animation.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace ui {
//
// A ThrobAnimation has two durations: the duration used when behavior like
// a SlideAnimation, and the duration used when throbbing.
class ThrobAnimation : public SlideAnimation {
class UI_API ThrobAnimation : public SlideAnimation {
public:
explicit ThrobAnimation(AnimationDelegate* target);
virtual ~ThrobAnimation() {}
Expand Down
3 changes: 2 additions & 1 deletion ui/base/animation/tween.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@
#pragma once

#include "base/basictypes.h"
#include "ui/ui_api.h"

namespace gfx {
class Rect;
}

namespace ui {

class Tween {
class UI_API Tween {
public:
enum Type {
LINEAR, // Linear.
Expand Down
3 changes: 2 additions & 1 deletion ui/base/clipboard/clipboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "base/process.h"
#include "base/shared_memory.h"
#include "base/string16.h"
#include "ui/ui_api.h"

namespace gfx {
class Size;
Expand All @@ -28,7 +29,7 @@ typedef struct _GtkClipboard GtkClipboard;

namespace ui {

class Clipboard {
class UI_API Clipboard {
public:
typedef std::string FormatType;

Expand Down
4 changes: 3 additions & 1 deletion ui/base/clipboard/clipboard_util_win.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@
#include <string>
#include <vector>

#include "ui/ui_api.h"

namespace ui {

class ClipboardUtil {
class UI_API ClipboardUtil {
public:
/////////////////////////////////////////////////////////////////////////////
// Clipboard formats.
Expand Down
3 changes: 2 additions & 1 deletion ui/base/clipboard/scoped_clipboard_writer.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

#include "base/string16.h"
#include "ui/base/clipboard/clipboard.h"
#include "ui/ui_api.h"

class Pickle;

Expand All @@ -25,7 +26,7 @@ namespace ui {
// into a Clipboard::ObjectMap.
// NB: You should probably NOT be using this class if you include
// webkit_glue.h. Use ScopedClipboardWriterGlue instead.
class ScopedClipboardWriter {
class UI_API ScopedClipboardWriter {
public:
// Create an instance that is a simple wrapper around clipboard.
explicit ScopedClipboardWriter(Clipboard* clipboard);
Expand Down
5 changes: 2 additions & 3 deletions ui/base/dragdrop/drag_drop_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@
#define UI_BASE_DRAGDROP_DRAG_DROP_TYPES_H_
#pragma once

#include "build/build_config.h"

#include "base/basictypes.h"
#include "ui/ui_api.h"

namespace ui {

class DragDropTypes {
class UI_API DragDropTypes {
public:
enum DragOperation {
DRAG_NONE = 0,
Expand Down
5 changes: 3 additions & 2 deletions ui/base/dragdrop/drag_source.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@

#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
#include "ui/ui_api.h"

namespace ui {

// A base IDropSource implementation. Handles notifications sent by an active
// drag-drop operation as the user mouses over other drop targets on their
// system. This object tells Windows whether or not the drag should continue,
// and supplies the appropriate cursors.
class DragSource : public IDropSource,
public base::RefCountedThreadSafe<DragSource> {
class UI_API DragSource : public IDropSource,
public base::RefCountedThreadSafe<DragSource> {
public:
DragSource();
virtual ~DragSource() {}
Expand Down
3 changes: 2 additions & 1 deletion ui/base/dragdrop/drop_target.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <objidl.h>

#include "base/memory/ref_counted.h"
#include "ui/ui_api.h"

// Windows interface.
struct IDropTargetHelper;
Expand All @@ -24,7 +25,7 @@ namespace ui {
// before the HWND is deleted too.
//
// This class is meant to be used in a STA and is not multithread-safe.
class DropTarget : public IDropTarget {
class UI_API DropTarget : public IDropTarget {
public:
// Create a new DropTarget associating it with the given HWND.
explicit DropTarget(HWND hwnd);
Expand Down
Loading

0 comments on commit ea47b6a

Please sign in to comment.