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 <set> | 7 #include <set> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 1588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1599 // TODO(wjmaclean): can host_ ever be null? | 1599 // TODO(wjmaclean): can host_ ever be null? |
1600 if (!host_) | 1600 if (!host_) |
1601 return; | 1601 return; |
1602 | 1602 |
1603 // TODO(suzhe): implement the newly added “locale” property of HTML DOM | 1603 // TODO(suzhe): implement the newly added “locale” property of HTML DOM |
1604 // TextEvent. | 1604 // TextEvent. |
1605 } | 1605 } |
1606 | 1606 |
1607 bool RenderWidgetHostViewAura::ChangeTextDirectionAndLayoutAlignment( | 1607 bool RenderWidgetHostViewAura::ChangeTextDirectionAndLayoutAlignment( |
1608 base::i18n::TextDirection direction) { | 1608 base::i18n::TextDirection direction) { |
1609 // TODO(wjmaclean): can host_ ever be null? | 1609 if (!GetTextInputManager() && !GetTextInputManager()->GetActiveWidget()) |
1610 if (!host_) | |
1611 return false; | 1610 return false; |
1612 host_->UpdateTextDirection( | 1611 |
1613 direction == base::i18n::RIGHT_TO_LEFT ? | 1612 GetTextInputManager()->GetActiveWidget()->UpdateTextDirection( |
1614 blink::WebTextDirectionRightToLeft : | 1613 direction == base::i18n::RIGHT_TO_LEFT |
1615 blink::WebTextDirectionLeftToRight); | 1614 ? blink::WebTextDirectionRightToLeft |
1616 host_->NotifyTextDirection(); | 1615 : blink::WebTextDirectionLeftToRight); |
| 1616 GetTextInputManager()->GetActiveWidget()->NotifyTextDirection(); |
1617 return true; | 1617 return true; |
1618 } | 1618 } |
1619 | 1619 |
1620 void RenderWidgetHostViewAura::ExtendSelectionAndDelete( | 1620 void RenderWidgetHostViewAura::ExtendSelectionAndDelete( |
1621 size_t before, size_t after) { | 1621 size_t before, size_t after) { |
1622 RenderFrameHostImpl* rfh = GetFocusedFrame(); | 1622 RenderFrameHostImpl* rfh = GetFocusedFrame(); |
1623 if (rfh) | 1623 if (rfh) |
1624 rfh->ExtendSelectionAndDelete(before, after); | 1624 rfh->ExtendSelectionAndDelete(before, after); |
1625 } | 1625 } |
1626 | 1626 |
(...skipping 1374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3001 | 3001 |
3002 //////////////////////////////////////////////////////////////////////////////// | 3002 //////////////////////////////////////////////////////////////////////////////// |
3003 // RenderWidgetHostViewBase, public: | 3003 // RenderWidgetHostViewBase, public: |
3004 | 3004 |
3005 // static | 3005 // static |
3006 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { | 3006 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { |
3007 GetScreenInfoForWindow(results, NULL); | 3007 GetScreenInfoForWindow(results, NULL); |
3008 } | 3008 } |
3009 | 3009 |
3010 } // namespace content | 3010 } // namespace content |
OLD | NEW |