summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/ui/tests/ui_gfx_image_unittest.cc6
-rw-r--r--chrome/browser/ui/tests/ui_gfx_image_unittest.mm6
-rw-r--r--ui/gfx/image.cc10
-rw-r--r--ui/gfx/image.h2
-rw-r--r--ui/gfx/image_mac.mm2
-rw-r--r--ui/gfx/image_unittest.cc16
-rw-r--r--ui/gfx/image_unittest.h4
7 files changed, 19 insertions, 27 deletions
diff --git a/chrome/browser/ui/tests/ui_gfx_image_unittest.cc b/chrome/browser/ui/tests/ui_gfx_image_unittest.cc
index a8e8166..392a3bf 100644
--- a/chrome/browser/ui/tests/ui_gfx_image_unittest.cc
+++ b/chrome/browser/ui/tests/ui_gfx_image_unittest.cc
@@ -20,11 +20,11 @@
namespace {
-using namespace ui::gfx::test;
+using namespace gfx::test;
#if defined(TOOLKIT_VIEWS)
TEST(UiGfxImageTest, ViewsImageView) {
- ui::gfx::Image image(CreatePlatformImage());
+ gfx::Image image(CreatePlatformImage());
scoped_ptr<views::View> container(new views::View());
container->SetBounds(0, 0, 200, 200);
@@ -45,7 +45,7 @@ TEST(UiGfxImageTest, GtkImageView) {
GtkWidget* fixed = gtk_fixed_new();
gtk_container_add(GTK_CONTAINER(window), fixed);
- ui::gfx::Image image(CreateBitmap());
+ gfx::Image image(CreateBitmap());
GtkWidget* image_view = gtk_image_new_from_pixbuf(image);
gtk_fixed_put(GTK_FIXED(fixed), image_view, 10, 10);
gtk_widget_set_size_request(image_view, 25, 25);
diff --git a/chrome/browser/ui/tests/ui_gfx_image_unittest.mm b/chrome/browser/ui/tests/ui_gfx_image_unittest.mm
index c48e9bd..757ab26 100644
--- a/chrome/browser/ui/tests/ui_gfx_image_unittest.mm
+++ b/chrome/browser/ui/tests/ui_gfx_image_unittest.mm
@@ -13,13 +13,13 @@
namespace {
-using namespace ui::gfx::test;
+using namespace gfx::test;
class UiGfxImageTest : public CocoaTest {
};
TEST_F(UiGfxImageTest, CheckColor) {
- ui::gfx::Image image(CreateBitmap());
+ gfx::Image image(CreateBitmap());
[image lockFocus];
NSColor* color = NSReadPixel(NSMakePoint(10, 10));
[image unlockFocus];
@@ -44,7 +44,7 @@ TEST_F(UiGfxImageTest, ImageView) {
[[test_window() contentView] addSubview:image_view];
[test_window() orderFront:nil];
- ui::gfx::Image image(CreateBitmap());
+ gfx::Image image(CreateBitmap());
[image_view setImage:image];
}
diff --git a/ui/gfx/image.cc b/ui/gfx/image.cc
index 6eac4c0..9a9c808 100644
--- a/ui/gfx/image.cc
+++ b/ui/gfx/image.cc
@@ -16,7 +16,6 @@
#include "skia/ext/skia_utils_mac.h"
#endif
-namespace ui {
namespace gfx {
namespace internal {
@@ -29,8 +28,8 @@ const SkBitmap* NSImageToSkBitmap(NSImage* image);
#if defined(OS_LINUX)
const SkBitmap* GdkPixbufToSkBitmap(GdkPixbuf* pixbuf) {
- ::gfx::CanvasSkia canvas(gdk_pixbuf_get_width(pixbuf),
- gdk_pixbuf_get_height(pixbuf),
+ gfx::CanvasSkia canvas(gdk_pixbuf_get_width(pixbuf),
+ gdk_pixbuf_get_height(pixbuf),
false);
canvas.DrawGdkPixbuf(pixbuf, 0, 0);
return new SkBitmap(canvas.ExtractBitmap());
@@ -252,12 +251,12 @@ internal::ImageRep* Image::GetRepresentation(RepresentationType rep_type) {
internal::ImageRep* native_rep = NULL;
#if defined(OS_LINUX)
if (rep_type == Image::kGdkPixbufRep) {
- GdkPixbuf* pixbuf = ::gfx::GdkPixbufFromSkBitmap(skia_rep->bitmap());
+ GdkPixbuf* pixbuf = gfx::GdkPixbufFromSkBitmap(skia_rep->bitmap());
native_rep = new internal::GdkPixbufRep(pixbuf);
}
#elif defined(OS_MACOSX)
if (rep_type == Image::kNSImageRep) {
- NSImage* image = ::gfx::SkBitmapToNSImage(*(skia_rep->bitmap()));
+ NSImage* image = gfx::SkBitmapToNSImage(*(skia_rep->bitmap()));
base::mac::NSObjectRetain(image);
native_rep = new internal::NSImageRep(image);
}
@@ -278,4 +277,3 @@ void Image::AddRepresentation(internal::ImageRep* rep) {
}
} // namespace gfx
-} // namespace ui
diff --git a/ui/gfx/image.h b/ui/gfx/image.h
index ebd5cc5..33e363e 100644
--- a/ui/gfx/image.h
+++ b/ui/gfx/image.h
@@ -18,7 +18,6 @@ namespace {
class ImageTest;
}
-namespace ui {
namespace gfx {
namespace internal {
@@ -89,6 +88,5 @@ class Image {
};
} // namespace gfx
-} // namespace ui
#endif // UI_GFX_IMAGE_H_
diff --git a/ui/gfx/image_mac.mm b/ui/gfx/image_mac.mm
index c74d52d..b3dc977 100644
--- a/ui/gfx/image_mac.mm
+++ b/ui/gfx/image_mac.mm
@@ -7,7 +7,6 @@
#include "skia/ext/skia_utils_mac.h"
#include "third_party/skia/include/core/SkBitmap.h"
-namespace ui {
namespace gfx {
namespace internal {
@@ -17,4 +16,3 @@ const SkBitmap* NSImageToSkBitmap(NSImage* image) {
} // namespace internal
} // namespace gfx
-} // namespace ui
diff --git a/ui/gfx/image_unittest.cc b/ui/gfx/image_unittest.cc
index cb4fd49..2325104 100644
--- a/ui/gfx/image_unittest.cc
+++ b/ui/gfx/image_unittest.cc
@@ -19,7 +19,7 @@
namespace {
-using namespace ui::gfx::test;
+using namespace gfx::test;
#if defined(TOOLKIT_VIEWS)
const bool kUsesSkiaNatively = true;
@@ -29,13 +29,13 @@ const bool kUsesSkiaNatively = false;
class ImageTest : public testing::Test {
public:
- size_t GetRepCount(const ui::gfx::Image& image) {
+ size_t GetRepCount(const gfx::Image& image) {
return image.representations_.size();
}
};
TEST_F(ImageTest, SkiaToSkia) {
- ui::gfx::Image image(CreateBitmap());
+ gfx::Image image(CreateBitmap());
const SkBitmap* bitmap = static_cast<const SkBitmap*>(image);
EXPECT_TRUE(bitmap);
EXPECT_FALSE(bitmap->isNull());
@@ -49,7 +49,7 @@ TEST_F(ImageTest, SkiaToSkia) {
}
TEST_F(ImageTest, SkiaToSkiaRef) {
- ui::gfx::Image image(CreateBitmap());
+ gfx::Image image(CreateBitmap());
const SkBitmap& bitmap = static_cast<const SkBitmap&>(image);
EXPECT_FALSE(bitmap.isNull());
@@ -61,7 +61,7 @@ TEST_F(ImageTest, SkiaToSkiaRef) {
}
TEST_F(ImageTest, SkiaToPlatform) {
- ui::gfx::Image image(CreateBitmap());
+ gfx::Image image(CreateBitmap());
const size_t kRepCount = kUsesSkiaNatively ? 1U : 2U;
EXPECT_TRUE(static_cast<PlatformImage>(image));
@@ -73,7 +73,7 @@ TEST_F(ImageTest, SkiaToPlatform) {
}
TEST_F(ImageTest, PlatformToSkia) {
- ui::gfx::Image image(CreatePlatformImage());
+ gfx::Image image(CreatePlatformImage());
const size_t kRepCount = kUsesSkiaNatively ? 1U : 2U;
const SkBitmap* bitmap = static_cast<const SkBitmap*>(image);
@@ -86,7 +86,7 @@ TEST_F(ImageTest, PlatformToSkia) {
}
TEST_F(ImageTest, PlatformToPlatform) {
- ui::gfx::Image image(CreatePlatformImage());
+ gfx::Image image(CreatePlatformImage());
EXPECT_TRUE(static_cast<PlatformImage>(image));
EXPECT_EQ(1U, GetRepCount(image));
@@ -96,7 +96,7 @@ TEST_F(ImageTest, PlatformToPlatform) {
}
TEST_F(ImageTest, CheckSkiaColor) {
- ui::gfx::Image image(CreatePlatformImage());
+ gfx::Image image(CreatePlatformImage());
const SkBitmap& bitmap(image);
SkAutoLockPixels auto_lock(bitmap);
diff --git a/ui/gfx/image_unittest.h b/ui/gfx/image_unittest.h
index c4941d1..abb07e9 100644
--- a/ui/gfx/image_unittest.h
+++ b/ui/gfx/image_unittest.h
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Because the unit tests for ui::gfx::Image are spread across multiple
+// Because the unit tests for gfx::Image are spread across multiple
// implementation files, this header contains the reusable components.
#ifndef UI_GFX_IMAGE_UNITTEST_H_
@@ -19,7 +19,6 @@
#include "skia/ext/skia_utils_mac.h"
#endif
-namespace ui {
namespace gfx {
namespace test {
@@ -54,6 +53,5 @@ PlatformImage CreatePlatformImage() {
} // namespace test
} // namespace gfx
-} // namespace ui
#endif // UI_GFX_IMAGE_UNITTEST_H_