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