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

Side by Side Diff: content/browser/web_contents/web_contents_view_aura.cc

Issue 10831361: Draggable region support for frameless app window on CrOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use ShouldDescendIntoChildForEventHandling 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/web_contents/web_contents_view_aura.h" 5 #include "content/browser/web_contents/web_contents_view_aura.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "content/browser/renderer_host/dip_util.h" 8 #include "content/browser/renderer_host/dip_util.h"
9 #include "content/browser/renderer_host/render_view_host_factory.h" 9 #include "content/browser/renderer_host/render_view_host_factory.h"
10 #include "content/browser/web_contents/interstitial_page_impl.h" 10 #include "content/browser/web_contents/interstitial_page_impl.h"
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 gfx::NativeCursor WebContentsViewAura::GetCursor(const gfx::Point& point) { 503 gfx::NativeCursor WebContentsViewAura::GetCursor(const gfx::Point& point) {
504 return gfx::kNullCursor; 504 return gfx::kNullCursor;
505 } 505 }
506 506
507 int WebContentsViewAura::GetNonClientComponent(const gfx::Point& point) const { 507 int WebContentsViewAura::GetNonClientComponent(const gfx::Point& point) const {
508 return HTCLIENT; 508 return HTCLIENT;
509 } 509 }
510 510
511 bool WebContentsViewAura::ShouldDescendIntoChildForEventHandling( 511 bool WebContentsViewAura::ShouldDescendIntoChildForEventHandling(
512 aura::Window* child, 512 aura::Window* child,
513 const gfx::Point& location) { 513 const gfx::Point& event_location,
514 ui::EventType event_type) {
514 return true; 515 return true;
515 } 516 }
516 517
517 bool WebContentsViewAura::OnMouseEvent(ui::MouseEvent* event) { 518 bool WebContentsViewAura::OnMouseEvent(ui::MouseEvent* event) {
518 if (!web_contents_->GetDelegate()) 519 if (!web_contents_->GetDelegate())
519 return false; 520 return false;
520 521
521 switch (event->type()) { 522 switch (event->type()) {
522 case ui::ET_MOUSE_PRESSED: 523 case ui::ET_MOUSE_PRESSED:
523 web_contents_->GetDelegate()->ActivateContents(web_contents_); 524 web_contents_->GetDelegate()->ActivateContents(web_contents_);
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 OnDragEntered(event); 634 OnDragEntered(event);
634 635
635 web_contents_->GetRenderViewHost()->DragTargetDrop( 636 web_contents_->GetRenderViewHost()->DragTargetDrop(
636 event.location(), 637 event.location(),
637 gfx::Screen::GetCursorScreenPoint(), 638 gfx::Screen::GetCursorScreenPoint(),
638 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags())); 639 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags()));
639 if (drag_dest_delegate_) 640 if (drag_dest_delegate_)
640 drag_dest_delegate_->OnDrop(); 641 drag_dest_delegate_->OnDrop();
641 return current_drag_op_; 642 return current_drag_op_;
642 } 643 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698