Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/renderer_host/render_widget_host_view_win.h" | 5 #include "chrome/browser/renderer_host/render_widget_host_view_win.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
| (...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 280 } | 280 } |
| 281 | 281 |
| 282 void RenderWidgetHostViewWin::DidBecomeSelected() { | 282 void RenderWidgetHostViewWin::DidBecomeSelected() { |
| 283 if (!is_hidden_) | 283 if (!is_hidden_) |
| 284 return; | 284 return; |
| 285 | 285 |
| 286 if (tab_switch_paint_time_.is_null()) | 286 if (tab_switch_paint_time_.is_null()) |
| 287 tab_switch_paint_time_ = TimeTicks::Now(); | 287 tab_switch_paint_time_ = TimeTicks::Now(); |
| 288 is_hidden_ = false; | 288 is_hidden_ = false; |
| 289 EnsureTooltip(); | 289 EnsureTooltip(); |
| 290 if (text_input_type_ == ui::TEXT_INPUT_TYPE_TEXT) | |
|
James Su
2011/08/08 01:41:11
Several additional text input type have been added
bashi
2011/08/08 06:16:28
Done.
| |
| 291 ime_input_.EnableIME(m_hWnd); | |
| 292 else | |
| 293 ime_input_.DisableIME(m_hWnd); | |
| 290 render_widget_host_->WasRestored(); | 294 render_widget_host_->WasRestored(); |
| 291 } | 295 } |
| 292 | 296 |
| 293 void RenderWidgetHostViewWin::WasHidden() { | 297 void RenderWidgetHostViewWin::WasHidden() { |
| 294 if (is_hidden_) | 298 if (is_hidden_) |
| 295 return; | 299 return; |
| 296 | 300 |
| 297 // If we receive any more paint messages while we are hidden, we want to | 301 // If we receive any more paint messages while we are hidden, we want to |
| 298 // ignore them so we don't re-allocate the backing store. We will paint | 302 // ignore them so we don't re-allocate the backing store. We will paint |
| 299 // everything again when we become selected again. | 303 // everything again when we become selected again. |
| (...skipping 1529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1829 DWORD ex_style) { | 1833 DWORD ex_style) { |
| 1830 parent_hwnd_ = parent_hwnd; | 1834 parent_hwnd_ = parent_hwnd; |
| 1831 Create(parent_hwnd_, NULL, NULL, WS_POPUP, ex_style); | 1835 Create(parent_hwnd_, NULL, NULL, WS_POPUP, ex_style); |
| 1832 MoveWindow(pos.x(), pos.y(), pos.width(), pos.height(), TRUE); | 1836 MoveWindow(pos.x(), pos.y(), pos.width(), pos.height(), TRUE); |
| 1833 // To show tooltip on popup window.(e.g. title in <select>) | 1837 // To show tooltip on popup window.(e.g. title in <select>) |
| 1834 // Popups default to showing, which means |DidBecomeSelected()| isn't invoked. | 1838 // Popups default to showing, which means |DidBecomeSelected()| isn't invoked. |
| 1835 // Ensure the tooltip is created otherwise tooltips are never shown. | 1839 // Ensure the tooltip is created otherwise tooltips are never shown. |
| 1836 EnsureTooltip(); | 1840 EnsureTooltip(); |
| 1837 ShowWindow(IsActivatable() ? SW_SHOW : SW_SHOWNA); | 1841 ShowWindow(IsActivatable() ? SW_SHOW : SW_SHOWNA); |
| 1838 } | 1842 } |
| OLD | NEW |