Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3572)

Unified Diff: chrome/browser/ui/views/extensions/shell_window_views.cc

Issue 10831361: Draggable region support for frameless app window on CrOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove event type filtering Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/extensions/shell_window_views.h ('k') | ui/aura/window_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/extensions/shell_window_views.cc
diff --git a/chrome/browser/ui/views/extensions/shell_window_views.cc b/chrome/browser/ui/views/extensions/shell_window_views.cc
index 387d1f9ed3dd73dd6c16e31dd115b8f25bdff37d..0b23aeac0361a6c3269c9740cba57bb103cea0e7 100644
--- a/chrome/browser/ui/views/extensions/shell_window_views.cc
+++ b/chrome/browser/ui/views/extensions/shell_window_views.cc
@@ -336,6 +336,20 @@ views::View* ShellWindowViews::GetInitiallyFocusedView() {
return web_view_;
}
+bool ShellWindowViews::ShouldDescendIntoChildForEventHandling(
+ gfx::NativeView child,
+ const gfx::Point& location) {
+#if defined(USE_AURA)
+ DCHECK_EQ(child, web_view_->web_contents()->GetView()->GetNativeView());
+ // Shell window should claim mouse events that fall within the draggable
+ // region.
+ return !draggable_region_.get() ||
+ !draggable_region_->contains(location.x(), location.y());
+#else
+ return true;
+#endif
+}
+
void ShellWindowViews::OnFocus() {
web_view_->RequestFocus();
}
« no previous file with comments | « chrome/browser/ui/views/extensions/shell_window_views.h ('k') | ui/aura/window_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698