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

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

Issue 138033014: Consistent fading behavior for touch editing handles (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 1387 matching lines...) Expand 10 before | Expand all | Expand 10 after
1398 navigation_overlay_.reset(); 1398 navigation_overlay_.reset();
1399 else if (!navigation_overlay_) 1399 else if (!navigation_overlay_)
1400 navigation_overlay_.reset(new OverscrollNavigationOverlay(web_contents_)); 1400 navigation_overlay_.reset(new OverscrollNavigationOverlay(web_contents_));
1401 } 1401 }
1402 1402
1403 //////////////////////////////////////////////////////////////////////////////// 1403 ////////////////////////////////////////////////////////////////////////////////
1404 // WebContentsViewAura, RenderViewHostDelegateView implementation: 1404 // WebContentsViewAura, RenderViewHostDelegateView implementation:
1405 1405
1406 void WebContentsViewAura::ShowContextMenu(const ContextMenuParams& params) { 1406 void WebContentsViewAura::ShowContextMenu(const ContextMenuParams& params) {
1407 if (touch_editable_) 1407 if (touch_editable_)
1408 touch_editable_->EndTouchEditing(); 1408 touch_editable_->EndTouchEditing(false);
1409 if (delegate_) { 1409 if (delegate_) {
1410 delegate_->ShowContextMenu(params); 1410 delegate_->ShowContextMenu(params);
1411 // WARNING: we may have been deleted during the call to ShowContextMenu(). 1411 // WARNING: we may have been deleted during the call to ShowContextMenu().
1412 } 1412 }
1413 } 1413 }
1414 1414
1415 void WebContentsViewAura::ShowPopupMenu(const gfx::Rect& bounds, 1415 void WebContentsViewAura::ShowPopupMenu(const gfx::Rect& bounds,
1416 int item_height, 1416 int item_height,
1417 double item_font_size, 1417 double item_font_size,
1418 int selected_item, 1418 int selected_item,
(...skipping 10 matching lines...) Expand all
1429 const gfx::ImageSkia& image, 1429 const gfx::ImageSkia& image,
1430 const gfx::Vector2d& image_offset, 1430 const gfx::Vector2d& image_offset,
1431 const DragEventSourceInfo& event_info) { 1431 const DragEventSourceInfo& event_info) {
1432 aura::Window* root_window = GetNativeView()->GetRootWindow(); 1432 aura::Window* root_window = GetNativeView()->GetRootWindow();
1433 if (!aura::client::GetDragDropClient(root_window)) { 1433 if (!aura::client::GetDragDropClient(root_window)) {
1434 web_contents_->SystemDragEnded(); 1434 web_contents_->SystemDragEnded();
1435 return; 1435 return;
1436 } 1436 }
1437 1437
1438 if (touch_editable_) 1438 if (touch_editable_)
1439 touch_editable_->EndTouchEditing(); 1439 touch_editable_->EndTouchEditing(false);
1440 1440
1441 ui::OSExchangeData::Provider* provider = ui::OSExchangeData::CreateProvider(); 1441 ui::OSExchangeData::Provider* provider = ui::OSExchangeData::CreateProvider();
1442 PrepareDragData(drop_data, provider, web_contents_); 1442 PrepareDragData(drop_data, provider, web_contents_);
1443 1443
1444 ui::OSExchangeData data(provider); // takes ownership of |provider|. 1444 ui::OSExchangeData data(provider); // takes ownership of |provider|.
1445 1445
1446 if (!image.isNull()) { 1446 if (!image.isNull()) {
1447 drag_utils::SetDragImageOnDataObject(image, 1447 drag_utils::SetDragImageOnDataObject(image,
1448 gfx::Size(image.width(), image.height()), image_offset, &data); 1448 gfx::Size(image.width(), image.height()), image_offset, &data);
1449 } 1449 }
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
1793 event.location(), 1793 event.location(),
1794 gfx::Screen::GetScreenFor(GetNativeView())->GetCursorScreenPoint(), 1794 gfx::Screen::GetScreenFor(GetNativeView())->GetCursorScreenPoint(),
1795 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags())); 1795 ConvertAuraEventFlagsToWebInputEventModifiers(event.flags()));
1796 if (drag_dest_delegate_) 1796 if (drag_dest_delegate_)
1797 drag_dest_delegate_->OnDrop(); 1797 drag_dest_delegate_->OnDrop();
1798 current_drop_data_.reset(); 1798 current_drop_data_.reset();
1799 return ConvertFromWeb(current_drag_op_); 1799 return ConvertFromWeb(current_drag_op_);
1800 } 1800 }
1801 1801
1802 } // namespace content 1802 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698