summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-13 02:50:56 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-13 02:50:56 +0000
commit50264918ffe6571a692525f06d976d6005e6dd78 (patch)
treeed617c1ac39cbcda866defb899b7c10146b08966 /views
parent84e59a487499dbfb1e52cf066f124aaef78782ba (diff)
downloadchromium_src-50264918ffe6571a692525f06d976d6005e6dd78.zip
chromium_src-50264918ffe6571a692525f06d976d6005e6dd78.tar.gz
chromium_src-50264918ffe6571a692525f06d976d6005e6dd78.tar.bz2
Remove unused ContainsNativeView methods.
BUG=none TEST=none TBR=sky Review URL: http://codereview.chromium.org/7352001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92305 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r--views/controls/native/native_view_host.cc13
-rw-r--r--views/controls/native/native_view_host.h1
-rw-r--r--views/view.cc9
-rw-r--r--views/view.h5
-rw-r--r--views/widget/native_widget_gtk.cc6
-rw-r--r--views/widget/native_widget_gtk.h1
-rw-r--r--views/widget/native_widget_private.h1
-rw-r--r--views/widget/native_widget_views.cc5
-rw-r--r--views/widget/native_widget_views.h1
-rw-r--r--views/widget/native_widget_win.cc4
-rw-r--r--views/widget/native_widget_win.h1
-rw-r--r--views/widget/widget.cc10
-rw-r--r--views/widget/widget.h5
13 files changed, 0 insertions, 62 deletions
diff --git a/views/controls/native/native_view_host.cc b/views/controls/native/native_view_host.cc
index c9fd990..616ad69 100644
--- a/views/controls/native/native_view_host.cc
+++ b/views/controls/native/native_view_host.cc
@@ -180,19 +180,6 @@ void NativeViewHost::OnFocus() {
this, ui::AccessibilityTypes::EVENT_FOCUS, true);
}
-bool NativeViewHost::ContainsNativeView(gfx::NativeView native_view) const {
- if (native_view == native_view_)
- return true;
- if (!native_view_)
- return false;
-
- views::Widget* widget = views::Widget::GetWidgetForNativeView(native_view);
- if (widget && widget->ContainsNativeView(native_view))
- return true;
-
- return View::ContainsNativeView(native_view);
-}
-
gfx::NativeViewAccessible NativeViewHost::GetNativeViewAccessible() {
if (native_wrapper_.get()) {
gfx::NativeViewAccessible accessible_view =
diff --git a/views/controls/native/native_view_host.h b/views/controls/native/native_view_host.h
index 30e4ddc..cb711cd 100644
--- a/views/controls/native/native_view_host.h
+++ b/views/controls/native/native_view_host.h
@@ -81,7 +81,6 @@ class NativeViewHost : public View {
virtual void OnPaint(gfx::Canvas* canvas);
virtual void VisibilityChanged(View* starting_from, bool is_visible);
virtual void OnFocus();
- virtual bool ContainsNativeView(gfx::NativeView native_view) const;
virtual gfx::NativeViewAccessible GetNativeViewAccessible();
protected:
diff --git a/views/view.cc b/views/view.cc
index 98ae12b..5f5b52c 100644
--- a/views/view.cc
+++ b/views/view.cc
@@ -245,15 +245,6 @@ int View::GetIndexOf(const View* view) const {
return i != children_.end() ? static_cast<int>(i - children_.begin()) : -1;
}
-// TODO(beng): remove
-bool View::ContainsNativeView(gfx::NativeView native_view) const {
- for (int i = 0, count = child_count(); i < count; ++i) {
- if (GetChildViewAt(i)->ContainsNativeView(native_view))
- return true;
- }
- return false;
-}
-
// Size and disposition --------------------------------------------------------
void View::SetBounds(int x, int y, int width, int height) {
diff --git a/views/view.h b/views/view.h
index cb71d74..d94a086 100644
--- a/views/view.h
+++ b/views/view.h
@@ -155,11 +155,6 @@ class View : public AcceleratorTarget {
// Returns the index of |view|, or -1 if |view| is not a child of this view.
int GetIndexOf(const View* view) const;
- // TODO(beng): REMOVE (TBD)
- // Returns true if the native view |native_view| is contained in the view
- // hierarchy beneath this view.
- virtual bool ContainsNativeView(gfx::NativeView native_view) const;
-
// Size and disposition ------------------------------------------------------
// Methods for obtaining and modifying the position and size of the view.
// Position is in the coordinate system of the view's parent.
diff --git a/views/widget/native_widget_gtk.cc b/views/widget/native_widget_gtk.cc
index 199160e..3e372f5 100644
--- a/views/widget/native_widget_gtk.cc
+++ b/views/widget/native_widget_gtk.cc
@@ -1231,12 +1231,6 @@ bool NativeWidgetGtk::IsAccessibleWidget() const {
return false;
}
-bool NativeWidgetGtk::ContainsNativeView(gfx::NativeView native_view) const {
- // TODO(port) See implementation in NativeWidgetWin::ContainsNativeView.
- NOTREACHED() << "NativeWidgetGtk::ContainsNativeView is not implemented.";
- return false;
-}
-
void NativeWidgetGtk::RunShellDrag(View* view,
const ui::OSExchangeData& data,
int operation) {
diff --git a/views/widget/native_widget_gtk.h b/views/widget/native_widget_gtk.h
index b346e26..00e0bed 100644
--- a/views/widget/native_widget_gtk.h
+++ b/views/widget/native_widget_gtk.h
@@ -221,7 +221,6 @@ class NativeWidgetGtk : public internal::NativeWidgetPrivate,
virtual void SetOpacity(unsigned char opacity) OVERRIDE;
virtual void SetUseDragFrame(bool use_drag_frame) OVERRIDE;
virtual bool IsAccessibleWidget() const OVERRIDE;
- virtual bool ContainsNativeView(gfx::NativeView native_view) const OVERRIDE;
virtual void RunShellDrag(View* view,
const ui::OSExchangeData& data,
int operation) OVERRIDE;
diff --git a/views/widget/native_widget_private.h b/views/widget/native_widget_private.h
index f9ba979..6bba0dd 100644
--- a/views/widget/native_widget_private.h
+++ b/views/widget/native_widget_private.h
@@ -199,7 +199,6 @@ class NativeWidgetPrivate : public NativeWidget {
virtual void SetOpacity(unsigned char opacity) = 0;
virtual void SetUseDragFrame(bool use_drag_frame) = 0;
virtual bool IsAccessibleWidget() const = 0;
- virtual bool ContainsNativeView(gfx::NativeView native_view) const = 0;
virtual void RunShellDrag(View* view,
const ui::OSExchangeData& data,
int operation) = 0;
diff --git a/views/widget/native_widget_views.cc b/views/widget/native_widget_views.cc
index f92627e..c073b9d 100644
--- a/views/widget/native_widget_views.cc
+++ b/views/widget/native_widget_views.cc
@@ -375,11 +375,6 @@ bool NativeWidgetViews::IsAccessibleWidget() const {
return false;
}
-bool NativeWidgetViews::ContainsNativeView(gfx::NativeView native_view) const {
- NOTIMPLEMENTED();
- return GetParentNativeWidget()->ContainsNativeView(native_view);
-}
-
void NativeWidgetViews::RunShellDrag(View* view,
const ui::OSExchangeData& data,
int operation) {
diff --git a/views/widget/native_widget_views.h b/views/widget/native_widget_views.h
index e3d3edc..79a6205 100644
--- a/views/widget/native_widget_views.h
+++ b/views/widget/native_widget_views.h
@@ -108,7 +108,6 @@ class NativeWidgetViews : public internal::NativeWidgetPrivate {
virtual void SetOpacity(unsigned char opacity) OVERRIDE;
virtual void SetUseDragFrame(bool use_drag_frame) OVERRIDE;
virtual bool IsAccessibleWidget() const OVERRIDE;
- virtual bool ContainsNativeView(gfx::NativeView native_view) const OVERRIDE;
virtual void RunShellDrag(View* view,
const ui::OSExchangeData& data,
int operation) OVERRIDE;
diff --git a/views/widget/native_widget_win.cc b/views/widget/native_widget_win.cc
index 83e6126..56d12dc 100644
--- a/views/widget/native_widget_win.cc
+++ b/views/widget/native_widget_win.cc
@@ -1031,10 +1031,6 @@ bool NativeWidgetWin::IsAccessibleWidget() const {
return screen_reader_active_;
}
-bool NativeWidgetWin::ContainsNativeView(gfx::NativeView native_view) const {
- return hwnd() == native_view || ::IsChild(hwnd(), native_view);
-}
-
void NativeWidgetWin::RunShellDrag(View* view,
const ui::OSExchangeData& data,
int operation) {
diff --git a/views/widget/native_widget_win.h b/views/widget/native_widget_win.h
index 53457dc..52dbb5c 100644
--- a/views/widget/native_widget_win.h
+++ b/views/widget/native_widget_win.h
@@ -259,7 +259,6 @@ class NativeWidgetWin : public ui::WindowImpl,
virtual void SetOpacity(unsigned char opacity) OVERRIDE;
virtual void SetUseDragFrame(bool use_drag_frame) OVERRIDE;
virtual bool IsAccessibleWidget() const OVERRIDE;
- virtual bool ContainsNativeView(gfx::NativeView native_view) const OVERRIDE;
virtual void RunShellDrag(View* view,
const ui::OSExchangeData& data,
int operation) OVERRIDE;
diff --git a/views/widget/widget.cc b/views/widget/widget.cc
index e668042..a3f5c02 100644
--- a/views/widget/widget.cc
+++ b/views/widget/widget.cc
@@ -537,16 +537,6 @@ InputMethod* Widget::GetInputMethod() {
toplevel_widget->native_widget_->GetInputMethodNative() : NULL;
}
-bool Widget::ContainsNativeView(gfx::NativeView native_view) {
- if (native_widget_->ContainsNativeView(native_view))
- return true;
-
- // A views::NativeViewHost may contain the given native view, without it being
- // an ancestor of hwnd(), so traverse the views::View hierarchy looking for
- // such views.
- return GetRootView()->ContainsNativeView(native_view);
-}
-
void Widget::RunShellDrag(View* view, const ui::OSExchangeData& data,
int operation) {
dragged_view_ = view;
diff --git a/views/widget/widget.h b/views/widget/widget.h
index 3021518..bc16530 100644
--- a/views/widget/widget.h
+++ b/views/widget/widget.h
@@ -369,11 +369,6 @@ class Widget : public internal::NativeWidgetDelegate,
// Note that all widgets in a widget hierarchy share the same input method.
InputMethod* GetInputMethod();
- // Returns true if the native view |native_view| is contained in the
- // views::View hierarchy rooted at this widget.
- // TODO(beng): const.
- bool ContainsNativeView(gfx::NativeView native_view);
-
// Starts a drag operation for the specified view. This blocks until the drag
// operation completes. |view| can be NULL.
// If the view is non-NULL it can be accessed during the drag by calling