| OLD | NEW |
| 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/base/resource/resource_bundle.h" | 10 #include "ui/base/resource/resource_bundle.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 gfx::NativeView context, | 65 gfx::NativeView context, |
| 66 views::WidgetDelegate* widget_delegate) { | 66 views::WidgetDelegate* widget_delegate) { |
| 67 views::Widget* widget = new views::Widget; | 67 views::Widget* widget = new views::Widget; |
| 68 views::Widget::InitParams params(views::Widget::InitParams::TYPE_TOOLTIP); | 68 views::Widget::InitParams params(views::Widget::InitParams::TYPE_TOOLTIP); |
| 69 params.can_activate = false; | 69 params.can_activate = false; |
| 70 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; | 70 params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; |
| 71 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; | 71 params.ownership = views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; |
| 72 params.context = context; | 72 params.context = context; |
| 73 params.delegate = widget_delegate; | 73 params.delegate = widget_delegate; |
| 74 widget->Init(params); | 74 widget->Init(params); |
| 75 #if defined(USE_AURA) | |
| 76 SetShadowType(widget->GetNativeView(), views::corewm::SHADOW_TYPE_NONE); | 75 SetShadowType(widget->GetNativeView(), views::corewm::SHADOW_TYPE_NONE); |
| 77 #endif | |
| 78 return widget; | 76 return widget; |
| 79 } | 77 } |
| 80 | 78 |
| 81 gfx::Image* GetHandleImage() { | 79 gfx::Image* GetHandleImage() { |
| 82 static gfx::Image* handle_image = NULL; | 80 static gfx::Image* handle_image = NULL; |
| 83 if (!handle_image) { | 81 if (!handle_image) { |
| 84 handle_image = &ui::ResourceBundle::GetSharedInstance().GetImageNamed( | 82 handle_image = &ui::ResourceBundle::GetSharedInstance().GetImageNamed( |
| 85 IDR_TEXT_SELECTION_HANDLE); | 83 IDR_TEXT_SELECTION_HANDLE); |
| 86 } | 84 } |
| 87 return handle_image; | 85 return handle_image; |
| (...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 584 } | 582 } |
| 585 | 583 |
| 586 ui::TouchSelectionController* ViewsTouchSelectionControllerFactory::create( | 584 ui::TouchSelectionController* ViewsTouchSelectionControllerFactory::create( |
| 587 ui::TouchEditable* client_view) { | 585 ui::TouchEditable* client_view) { |
| 588 if (switches::IsTouchEditingEnabled()) | 586 if (switches::IsTouchEditingEnabled()) |
| 589 return new views::TouchSelectionControllerImpl(client_view); | 587 return new views::TouchSelectionControllerImpl(client_view); |
| 590 return NULL; | 588 return NULL; |
| 591 } | 589 } |
| 592 | 590 |
| 593 } // namespace views | 591 } // namespace views |
| OLD | NEW |