| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_view_host.h" | 5 #include "chrome/browser/renderer_host/render_view_host.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 1831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1842 | 1842 |
| 1843 void RenderViewHost::NotifyRendererUnresponsive() { | 1843 void RenderViewHost::NotifyRendererUnresponsive() { |
| 1844 delegate_->RendererUnresponsive( | 1844 delegate_->RendererUnresponsive( |
| 1845 this, is_waiting_for_beforeunload_ack_ || is_waiting_for_unload_ack_); | 1845 this, is_waiting_for_beforeunload_ack_ || is_waiting_for_unload_ack_); |
| 1846 } | 1846 } |
| 1847 | 1847 |
| 1848 void RenderViewHost::NotifyRendererResponsive() { | 1848 void RenderViewHost::NotifyRendererResponsive() { |
| 1849 delegate_->RendererResponsive(this); | 1849 delegate_->RendererResponsive(this); |
| 1850 } | 1850 } |
| 1851 | 1851 |
| 1852 void RenderViewHost::OnMsgFocusedNodeChanged() { | 1852 void RenderViewHost::OnMsgFocusedNodeChanged(bool is_editable_node) { |
| 1853 delegate_->FocusedNodeChanged(); | 1853 delegate_->FocusedNodeChanged(); |
| 1854 |
| 1855 #if defined(TOUCH_UI) |
| 1856 if (is_editable_node) { |
| 1857 // Need to summon on-screen keyboard |
| 1858 // TODO(bryeung): implement this |
| 1859 |
| 1860 // The currently focused element can be placed out of the view as the screen |
| 1861 // is now shared by the keyboard. Hence, we tell the renderer to scroll |
| 1862 // until the focused element comes in view. |
| 1863 Send(new ViewMsg_ScrollFocusedEditableNodeIntoView(routing_id())); |
| 1864 } else { |
| 1865 // TODO(bryeung): implement this. Should hide the on-screen keyboard. |
| 1866 } |
| 1867 #endif |
| 1854 } | 1868 } |
| 1855 | 1869 |
| 1856 void RenderViewHost::OnMsgFocus() { | 1870 void RenderViewHost::OnMsgFocus() { |
| 1857 RenderViewHostDelegate::View* view = delegate_->GetViewDelegate(); | 1871 RenderViewHostDelegate::View* view = delegate_->GetViewDelegate(); |
| 1858 if (view) | 1872 if (view) |
| 1859 view->Activate(); | 1873 view->Activate(); |
| 1860 } | 1874 } |
| 1861 | 1875 |
| 1862 void RenderViewHost::OnMsgBlur() { | 1876 void RenderViewHost::OnMsgBlur() { |
| 1863 RenderViewHostDelegate::View* view = delegate_->GetViewDelegate(); | 1877 RenderViewHostDelegate::View* view = delegate_->GetViewDelegate(); |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2194 } | 2208 } |
| 2195 #else | 2209 #else |
| 2196 void RenderViewHost::OnPagesReadyForPreview(int fd_in_browser) { | 2210 void RenderViewHost::OnPagesReadyForPreview(int fd_in_browser) { |
| 2197 // TODO(kmadhusu): Function definition needs to be changed. | 2211 // TODO(kmadhusu): Function definition needs to be changed. |
| 2198 // fd_in_browser should be the file descriptor of the metafile. | 2212 // fd_in_browser should be the file descriptor of the metafile. |
| 2199 | 2213 |
| 2200 // Send the printingDone msg for now. | 2214 // Send the printingDone msg for now. |
| 2201 Send(new ViewMsg_PrintingDone(routing_id(), -1, true)); | 2215 Send(new ViewMsg_PrintingDone(routing_id(), -1, true)); |
| 2202 } | 2216 } |
| 2203 #endif | 2217 #endif |
| OLD | NEW |