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

Side by Side Diff: ui/views/touchui/touch_selection_controller_impl.cc

Issue 297503003: Revert: [Refactor] Consolidate the logic for whether a widget can be activated. This is a first ste (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "ui/views/touchui/touch_selection_controller_impl.h" 5 #include "ui/views/touchui/touch_selection_controller_impl.h"
6 6
7 #include "base/time/time.h" 7 #include "base/time/time.h"
8 #include "grit/ui_resources.h" 8 #include "grit/ui_resources.h"
9 #include "grit/ui_strings.h" 9 #include "grit/ui_strings.h"
10 #include "ui/aura/client/cursor_client.h" 10 #include "ui/aura/client/cursor_client.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 // Maximum amount that selection handle bar can stick out of client view's 67 // Maximum amount that selection handle bar can stick out of client view's
68 // boundaries. 68 // boundaries.
69 const int kSelectionHandleBarBottomAllowance = 3; 69 const int kSelectionHandleBarBottomAllowance = 3;
70 70
71 // Creates a widget to host SelectionHandleView. 71 // Creates a widget to host SelectionHandleView.
72 views::Widget* CreateTouchSelectionPopupWidget( 72 views::Widget* CreateTouchSelectionPopupWidget(
73 gfx::NativeView context, 73 gfx::NativeView context,
74 views::WidgetDelegate* widget_delegate) { 74 views::WidgetDelegate* widget_delegate) {
75 views::Widget* widget = new views::Widget; 75 views::Widget* widget = new views::Widget;
76 views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP); 76 views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP);
77 params.can_activate = false;
77 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; 78 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW;
78 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; 79 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
79 params.parent = context; 80 params.parent = context;
80 params.delegate = widget_delegate; 81 params.delegate = widget_delegate;
81 widget->Init(params); 82 widget->Init(params);
82 SetShadowType(widget->GetNativeView(), wm::SHADOW_TYPE_NONE); 83 SetShadowType(widget->GetNativeView(), wm::SHADOW_TYPE_NONE);
83 return widget; 84 return widget;
84 } 85 }
85 86
86 gfx::Image* GetHandleImage() { 87 gfx::Image* GetHandleImage() {
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 622
622 bool TouchSelectionControllerImpl::IsSelectionHandle2Visible() { 623 bool TouchSelectionControllerImpl::IsSelectionHandle2Visible() {
623 return selection_handle_2_->IsWidgetVisible(); 624 return selection_handle_2_->IsWidgetVisible();
624 } 625 }
625 626
626 bool TouchSelectionControllerImpl::IsCursorHandleVisible() { 627 bool TouchSelectionControllerImpl::IsCursorHandleVisible() {
627 return cursor_handle_->IsWidgetVisible(); 628 return cursor_handle_->IsWidgetVisible();
628 } 629 }
629 630
630 } // namespace views 631 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/bubble/bubble_delegate.cc ('k') | ui/views/widget/desktop_aura/desktop_native_widget_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698