summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-14 15:14:53 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-14 15:14:53 +0000
commitbd63dc9cdf640a6d1e833ce0b5ed7ed9090973b0 (patch)
tree149a64e70ca634bd43019d639d9ae29ca6d45a9a /views
parentb39627f8eef41a2d4e1f4516bf905d6ad895e56b (diff)
downloadchromium_src-bd63dc9cdf640a6d1e833ce0b5ed7ed9090973b0.zip
chromium_src-bd63dc9cdf640a6d1e833ce0b5ed7ed9090973b0.tar.gz
chromium_src-bd63dc9cdf640a6d1e833ce0b5ed7ed9090973b0.tar.bz2
Refactor the PlatformContext layer to have only one class.
Previously we had three classes of PlatformCanvas*, one for each platform. Then we had a typedef of PlatformContext to PlatformCanvas[Mac|Win|Linux] for the specific platform. This means that it was almost impossible to forward-declare PlatformCanvas and there were a bunch of unnecessary includes of platform_canvas.h in header files. This change makes there be only one platform_canvas.h header with ifdefs, which removes a decent amount of duplicated code. There is a platform-independent file, and one platform-dependent file of platform_canvas for each platform. I also renamed PlatformDevice[Mac|Win|Linux] to PlatformDevice, althouth in this case I kept the separate headers since there was much less overlap. I also broke out CanvasPaint into separate headers so this template doesn't need to be included all over the project (only a couple of files actually need it). Review URL: http://codereview.chromium.org/125109 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18363 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rwxr-xr-x[-rw-r--r--]views/controls/tree/tree_view.cc2
-rwxr-xr-x[-rw-r--r--]views/widget/root_view_gtk.cc4
-rwxr-xr-x[-rw-r--r--]views/widget/root_view_win.cc2
-rwxr-xr-x[-rw-r--r--]views/window/window_win.cc2
4 files changed, 5 insertions, 5 deletions
diff --git a/views/controls/tree/tree_view.cc b/views/controls/tree/tree_view.cc
index 4aebad7..95a7210 100644..100755
--- a/views/controls/tree/tree_view.cc
+++ b/views/controls/tree/tree_view.cc
@@ -8,7 +8,7 @@
#include <atlapp.h>
#include <atlmisc.h>
-#include "app/gfx/canvas.h"
+#include "app/gfx/canvas_paint.h"
#include "app/gfx/icon_util.h"
#include "app/l10n_util.h"
#include "app/l10n_util_win.h"
diff --git a/views/widget/root_view_gtk.cc b/views/widget/root_view_gtk.cc
index 8f0c495..1225efe 100644..100755
--- a/views/widget/root_view_gtk.cc
+++ b/views/widget/root_view_gtk.cc
@@ -6,7 +6,7 @@
#include <gtk/gtk.h>
-#include "app/gfx/canvas.h"
+#include "app/gfx/canvas_paint.h"
#include "base/logging.h"
#include "views/widget/widget_gtk.h"
@@ -15,7 +15,7 @@ namespace views {
void RootView::OnPaint(GdkEventExpose* event) {
gfx::CanvasPaint canvas(event);
- if (!canvas.isEmpty()) {
+ if (!canvas.is_empty()) {
canvas.set_composite_alpha(
static_cast<WidgetGtk*>(GetWidget())->is_transparent());
SchedulePaint(gfx::Rect(canvas.rectangle()), false);
diff --git a/views/widget/root_view_win.cc b/views/widget/root_view_win.cc
index f5b315cb..eddbb6e 100644..100755
--- a/views/widget/root_view_win.cc
+++ b/views/widget/root_view_win.cc
@@ -5,7 +5,7 @@
#include "views/widget/root_view.h"
#include "app/drag_drop_types.h"
-#include "app/gfx/canvas.h"
+#include "app/gfx/canvas_paint.h"
#include "base/base_drag_source.h"
#include "base/logging.h"
#include "views/widget/root_view_drop_target.h"
diff --git a/views/window/window_win.cc b/views/window/window_win.cc
index 74807c8..f683822 100644..100755
--- a/views/window/window_win.cc
+++ b/views/window/window_win.cc
@@ -6,7 +6,7 @@
#include <shellapi.h>
-#include "app/gfx/canvas.h"
+#include "app/gfx/canvas_paint.h"
#include "app/gfx/font.h"
#include "app/gfx/icon_util.h"
#include "app/gfx/path.h"