Commit e83874fb authored by tfarina@chromium.org's avatar tfarina@chromium.org

Extract the last SkColor from ResourceBundle API.

NOTE: This was a TODO for ben@.

R=ben@chromium.org

Review URL: https://chromiumcodereview.appspot.com/9602003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124953 0039d316-1c4b-4281-b951-d872f2087c98
parent 9557a5aa
......@@ -32,6 +32,7 @@
#include "ui/gfx/path.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/screen.h"
#include "ui/views/color_constants.h"
#include "ui/views/controls/button/image_button.h"
#include "ui/views/focus/focus_manager.h"
#include "ui/views/views_delegate.h"
......@@ -272,7 +273,8 @@ const int kTitleLeftSpacing = 2;
const int kTitleCaptionSpacing = 5;
const SkColor kContentsBorderShadow = SkColorSetARGB(51, 0, 0, 0);
}
} // namespace
////////////////////////////////////////////////////////////////////////////////
// ConstrainedWindowFrameView, public:
......@@ -487,7 +489,7 @@ void ConstrainedWindowFrameView::PaintClientEdge(gfx::Canvas* canvas) {
frame_shadow_bounds.Inset(-kFrameShadowThickness, -kFrameShadowThickness);
canvas->FillRect(frame_shadow_bounds, kContentsBorderShadow);
canvas->FillRect(client_edge_bounds, ResourceBundle::toolbar_color);
canvas->FillRect(client_edge_bounds, views::kClientEdgeColor);
}
void ConstrainedWindowFrameView::LayoutWindowControls() {
......
......@@ -20,6 +20,7 @@
#include "ui/gfx/canvas.h"
#include "ui/gfx/font.h"
#include "ui/gfx/path.h"
#include "ui/views/color_constants.h"
#include "ui/views/controls/button/image_button.h"
#include "ui/views/widget/widget.h"
#include "ui/views/widget/widget_delegate.h"
......@@ -454,13 +455,13 @@ void AppPanelBrowserFrameView::PaintRestoredClientEdge(gfx::Canvas* canvas) {
canvas->TileImageInt(*left, client_area_bounds.x() - left->width(),
client_area_top, left->width(), client_area_height);
// Draw the toolbar color to fill in the edges.
// Draw the color to fill in the edges.
canvas->DrawRect(gfx::Rect(
client_area_bounds.x() - kClientEdgeThickness,
client_area_top - kClientEdgeThickness,
client_area_bounds.width() + kClientEdgeThickness,
client_area_bottom - client_area_top + kClientEdgeThickness),
ResourceBundle::toolbar_color);
views::kClientEdgeColor);
}
void AppPanelBrowserFrameView::LayoutWindowControls() {
......
......@@ -43,10 +43,6 @@ const int kLargeFontSizeDelta = 8;
ResourceBundle* ResourceBundle::g_shared_instance_ = NULL;
// static
const SkColor ResourceBundle::toolbar_color =
SkColorSetRGB(210, 225, 246);
// static
std::string ResourceBundle::InitSharedInstanceWithLocale(
const std::string& pref_locale) {
......
......@@ -27,9 +27,6 @@
#include "ui/gfx/native_widget_types.h"
class SkBitmap;
// Don't use uint32 or uint32_t here because Eclipse's indexer gets confused.
// This can be removed when the static colors are moved to ThemeProvider.
typedef unsigned int SkColor;
namespace base {
class Lock;
......@@ -191,9 +188,6 @@ class UI_EXPORT ResourceBundle {
public:
#endif
// TODO(beng): These browser-specific concepts should move to ThemeProvider.
static const SkColor toolbar_color;
private:
FRIEND_TEST_ALL_PREFIXES(ResourceBundle, LoadDataResourceBytes);
......
// Copyright (c) 2012 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.
#include "ui/views/color_constants.h"
namespace views {
const SkColor kClientEdgeColor = SkColorSetRGB(210, 225, 246);
} // namespace views
// Copyright (c) 2012 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.
#ifndef UI_VIEWS_COLOR_CONSTANTS_H_
#define UI_VIEWS_COLOR_CONSTANTS_H_
#pragma once
#include "third_party/skia/include/core/SkColor.h"
#include "ui/views/views_export.h"
namespace views {
VIEWS_EXPORT extern const SkColor kClientEdgeColor;
} // namespace views
#endif // UI_VIEWS_COLOR_CONSTANTS_H_
......@@ -65,6 +65,8 @@
'bubble/bubble_frame_view.h',
'button_drag_utils.cc',
'button_drag_utils.h',
'color_constants.cc',
'color_constants.h',
'context_menu_controller.h',
'controls/button/button.cc',
'controls/button/button.h',
......
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Copyright (c) 2012 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.
......@@ -15,6 +15,7 @@
#include "ui/gfx/canvas.h"
#include "ui/gfx/font.h"
#include "ui/gfx/path.h"
#include "ui/views/color_constants.h"
#include "ui/views/widget/widget_delegate.h"
#include "ui/views/window/client_view.h"
#include "ui/views/window/frame_background.h"
......@@ -433,10 +434,10 @@ void CustomFrameView::PaintRestoredClientEdge(gfx::Canvas* canvas) {
canvas->TileImageInt(*left, client_area_bounds.x() - left->width(),
client_area_top, left->width(), client_area_height);
// Draw the toolbar color to fill in the edges.
// Draw the color to fill in the edges.
canvas->DrawRect(gfx::Rect(client_area_bounds.x() - 1, client_area_top - 1,
client_area_bounds.width() + 1, client_area_bottom - client_area_top + 1),
ui::ResourceBundle::toolbar_color);
kClientEdgeColor);
}
SkColor CustomFrameView::GetFrameColor() const {
......@@ -444,7 +445,7 @@ SkColor CustomFrameView::GetFrameColor() const {
}
SkBitmap* CustomFrameView::GetFrameBitmap() const {
return ResourceBundle::GetSharedInstance().GetBitmapNamed(
return ui::ResourceBundle::GetSharedInstance().GetBitmapNamed(
frame_->IsActive() ? IDR_FRAME : IDR_FRAME_INACTIVE);
}
......
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