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

Replace an usage of ScopedSkRegion with our implementation of scoped_ptr.

R=jam@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124979 0039d316-1c4b-4281-b951-d872f2087c98
parent 3b4f6629
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
#include "content/public/common/page_zoom.h" #include "content/public/common/page_zoom.h"
#include "content/public/common/process_type.h" #include "content/public/common/process_type.h"
#include "skia/ext/skia_utils_win.h" #include "skia/ext/skia_utils_win.h"
#include "third_party/skia/include/core/SkRegion.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderline.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebCompositionUnderline.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/win/WebInputEventFactory.h" #include "third_party/WebKit/Source/WebKit/chromium/public/win/WebInputEventFactory.h"
...@@ -55,7 +56,6 @@ ...@@ -55,7 +56,6 @@
#include "ui/gfx/canvas_skia.h" #include "ui/gfx/canvas_skia.h"
#include "ui/gfx/gdi_util.h" #include "ui/gfx/gdi_util.h"
#include "ui/gfx/rect.h" #include "ui/gfx/rect.h"
#include "ui/gfx/scoped_sk_region.h"
#include "ui/gfx/screen.h" #include "ui/gfx/screen.h"
#include "webkit/glue/webaccessibility.h" #include "webkit/glue/webaccessibility.h"
#include "webkit/glue/webcursor.h" #include "webkit/glue/webcursor.h"
...@@ -330,7 +330,6 @@ RenderWidgetHostViewWin::RenderWidgetHostViewWin(RenderWidgetHost* widget) ...@@ -330,7 +330,6 @@ RenderWidgetHostViewWin::RenderWidgetHostViewWin(RenderWidgetHost* widget)
pointer_down_context_(false), pointer_down_context_(false),
focus_on_editable_field_(false), focus_on_editable_field_(false),
received_focus_change_after_pointer_down_(false), received_focus_change_after_pointer_down_(false),
transparent_region_(0),
touch_events_enabled_(false) { touch_events_enabled_(false) {
render_widget_host_->SetView(this); render_widget_host_->SetView(this);
registrar_.Add(this, registrar_.Add(this,
...@@ -1194,15 +1193,14 @@ void RenderWidgetHostViewWin::OnNCPaint(HRGN update_region) { ...@@ -1194,15 +1193,14 @@ void RenderWidgetHostViewWin::OnNCPaint(HRGN update_region) {
} }
void RenderWidgetHostViewWin::SetClickthroughRegion(SkRegion* region) { void RenderWidgetHostViewWin::SetClickthroughRegion(SkRegion* region) {
transparent_region_.Set(region); transparent_region_.reset(region);
} }
LRESULT RenderWidgetHostViewWin::OnNCHitTest(const CPoint& point) { LRESULT RenderWidgetHostViewWin::OnNCHitTest(const CPoint& point) {
RECT rc; RECT rc;
GetWindowRect(&rc); GetWindowRect(&rc);
if (transparent_region_.Get() && if (transparent_region_.get() &&
transparent_region_.Get()->contains(point.x - rc.left, transparent_region_->contains(point.x - rc.left, point.y - rc.top)) {
point.y - rc.top)) {
SetMsgHandled(TRUE); SetMsgHandled(TRUE);
return HTTRANSPARENT; return HTTRANSPARENT;
} }
......
...@@ -27,12 +27,12 @@ ...@@ -27,12 +27,12 @@
#include "ui/base/win/ime_input.h" #include "ui/base/win/ime_input.h"
#include "ui/gfx/native_widget_types.h" #include "ui/gfx/native_widget_types.h"
#include "ui/gfx/point.h" #include "ui/gfx/point.h"
#include "ui/gfx/scoped_sk_region.h"
#include "ui/gfx/surface/accelerated_surface_win.h" #include "ui/gfx/surface/accelerated_surface_win.h"
#include "webkit/glue/webcursor.h" #include "webkit/glue/webcursor.h"
class BackingStore; class BackingStore;
class RenderWidgetHost; class RenderWidgetHost;
class SkRegion;
namespace gfx { namespace gfx {
class Size; class Size;
...@@ -555,7 +555,7 @@ class RenderWidgetHostViewWin ...@@ -555,7 +555,7 @@ class RenderWidgetHostViewWin
bool received_focus_change_after_pointer_down_; bool received_focus_change_after_pointer_down_;
// Region in which the view will be transparent to clicks. // Region in which the view will be transparent to clicks.
gfx::ScopedSkRegion transparent_region_; scoped_ptr<SkRegion> transparent_region_;
// Are touch events currently enabled? // Are touch events currently enabled?
bool touch_events_enabled_; bool touch_events_enabled_;
......
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