OLD | NEW |
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/renderer_host/render_widget_host_view_aura.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1097 // Beware, this function is not called on all destruction paths. It will | 1097 // Beware, this function is not called on all destruction paths. It will |
1098 // implicitly end up calling ~RenderWidgetHostViewAura though, so all | 1098 // implicitly end up calling ~RenderWidgetHostViewAura though, so all |
1099 // destruction/cleanup code should happen there, not here. | 1099 // destruction/cleanup code should happen there, not here. |
1100 in_shutdown_ = true; | 1100 in_shutdown_ = true; |
1101 delete window_; | 1101 delete window_; |
1102 } | 1102 } |
1103 | 1103 |
1104 void RenderWidgetHostViewAura::SetTooltipText(const string16& tooltip_text) { | 1104 void RenderWidgetHostViewAura::SetTooltipText(const string16& tooltip_text) { |
1105 tooltip_ = tooltip_text; | 1105 tooltip_ = tooltip_text; |
1106 aura::RootWindow* root_window = window_->GetRootWindow(); | 1106 aura::RootWindow* root_window = window_->GetRootWindow(); |
1107 if (aura::client::GetTooltipClient(root_window)) | 1107 aura::client::TooltipClient* tooltip_client = |
1108 aura::client::GetTooltipClient(root_window)->UpdateTooltip(window_); | 1108 aura::client::GetTooltipClient(root_window); |
| 1109 if (tooltip_client) { |
| 1110 tooltip_client->UpdateTooltip(window_); |
| 1111 // Content tooltips should be visible indefinitely. |
| 1112 tooltip_client->SetTooltipShownTimeout(window_, 0); |
| 1113 } |
1109 } | 1114 } |
1110 | 1115 |
1111 void RenderWidgetHostViewAura::SelectionChanged(const string16& text, | 1116 void RenderWidgetHostViewAura::SelectionChanged(const string16& text, |
1112 size_t offset, | 1117 size_t offset, |
1113 const ui::Range& range) { | 1118 const ui::Range& range) { |
1114 RenderWidgetHostViewBase::SelectionChanged(text, offset, range); | 1119 RenderWidgetHostViewBase::SelectionChanged(text, offset, range); |
1115 | 1120 |
1116 #if defined(USE_X11) && !defined(OS_CHROMEOS) | 1121 #if defined(USE_X11) && !defined(OS_CHROMEOS) |
1117 if (text.empty() || range.is_empty()) | 1122 if (text.empty() || range.is_empty()) |
1118 return; | 1123 return; |
(...skipping 1837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2956 RenderWidgetHost* widget) { | 2961 RenderWidgetHost* widget) { |
2957 return new RenderWidgetHostViewAura(widget); | 2962 return new RenderWidgetHostViewAura(widget); |
2958 } | 2963 } |
2959 | 2964 |
2960 // static | 2965 // static |
2961 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { | 2966 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { |
2962 GetScreenInfoForWindow(results, NULL); | 2967 GetScreenInfoForWindow(results, NULL); |
2963 } | 2968 } |
2964 | 2969 |
2965 } // namespace content | 2970 } // namespace content |
OLD | NEW |