Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(153)

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 2161043002: Route Text Layout Change IPCs to the Active RenderWidgetHost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_view_aura_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_view_aura_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698