Commit 142e891d authored by tapted@chromium.org's avatar tapted@chromium.org

MacViews: Provide CreateNativeWidget and a stub NativeThemeMac in NativeWidgetMac

This is to get a baseline in tests so we can track coverage of future
CLs.

With this CL, 182 views_unittests pass (up from 125), but that's
incidental.

BUG=378134

Review URL: https://codereview.chromium.org/328103002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276556 0039d316-1c4b-4281-b951-d872f2087c98
parent 74528bb1
...@@ -5,12 +5,14 @@ ...@@ -5,12 +5,14 @@
#ifndef UI_NATIVE_THEME_NATIVE_THEME_MAC_H_ #ifndef UI_NATIVE_THEME_NATIVE_THEME_MAC_H_
#define UI_NATIVE_THEME_NATIVE_THEME_MAC_H_ #define UI_NATIVE_THEME_NATIVE_THEME_MAC_H_
#include "ui/native_theme/native_theme_base.h" #include "ui/native_theme/fallback_theme.h"
#include "ui/native_theme/native_theme_export.h"
namespace ui { namespace ui {
// Mac implementation of native theme support. // Mac implementation of native theme support.
class NativeThemeMac : public NativeThemeBase { // TODO(tapted): This should not use FallbackTheme. http://crbug.com/379086.
class NativeThemeMac : public FallbackTheme {
public: public:
static NativeThemeMac* instance(); static NativeThemeMac* instance();
......
...@@ -36,7 +36,8 @@ SkColor NativeThemeMac::GetSystemColor(ColorId color_id) const { ...@@ -36,7 +36,8 @@ SkColor NativeThemeMac::GetSystemColor(ColorId color_id) const {
case kColorId_DialogBackground: case kColorId_DialogBackground:
return kDialogBackgroundColor; return kDialogBackgroundColor;
default: default:
NOTREACHED() << "Invalid color_id: " << color_id; NOTIMPLEMENTED() << " Invalid color_id: " << color_id;
return FallbackTheme::GetSystemColor(color_id);
} }
return kInvalidColorIdColor; return kInvalidColorIdColor;
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include <Cocoa/Cocoa.h> #include <Cocoa/Cocoa.h>
#include "ui/gfx/font_list.h" #include "ui/gfx/font_list.h"
#include "ui/native_theme/native_theme.h"
namespace views { namespace views {
...@@ -347,8 +348,7 @@ void NativeWidgetMac::SetVisibilityChangedAnimationsEnabled(bool value) { ...@@ -347,8 +348,7 @@ void NativeWidgetMac::SetVisibilityChangedAnimationsEnabled(bool value) {
} }
ui::NativeTheme* NativeWidgetMac::GetNativeTheme() const { ui::NativeTheme* NativeWidgetMac::GetNativeTheme() const {
NOTIMPLEMENTED(); return ui::NativeTheme::instance();
return NULL;
} }
void NativeWidgetMac::OnRootViewLayout() const { void NativeWidgetMac::OnRootViewLayout() const {
...@@ -376,8 +376,7 @@ namespace internal { ...@@ -376,8 +376,7 @@ namespace internal {
// static // static
NativeWidgetPrivate* NativeWidgetPrivate::CreateNativeWidget( NativeWidgetPrivate* NativeWidgetPrivate::CreateNativeWidget(
internal::NativeWidgetDelegate* delegate) { internal::NativeWidgetDelegate* delegate) {
NOTIMPLEMENTED(); return new NativeWidgetMac(delegate);
return NULL;
} }
// static // static
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment