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

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

Issue 2166573003: Track TextInputState from multiple RenderWidgets in TextInputManager (Mac) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disabled SitePerProcessTextInputManagerTest.TrackTextSelectionForAllFrames on Mac since the corresp… Created 4 years, 4 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/text_input_manager.h" 5 #include "content/browser/renderer_host/text_input_manager.h"
6 6
7 #include "base/strings/string16.h" 7 #include "base/strings/string16.h"
8 #include "content/browser/renderer_host/render_widget_host_impl.h" 8 #include "content/browser/renderer_host/render_widget_host_impl.h"
9 #include "content/browser/renderer_host/render_widget_host_view_base.h" 9 #include "content/browser/renderer_host/render_widget_host_view_base.h"
10 #include "content/common/view_messages.h" 10 #include "content/common/view_messages.h"
11 #include "ui/gfx/geometry/rect.h" 11 #include "ui/gfx/geometry/rect.h"
12 #include "ui/gfx/range/range.h" 12 #include "ui/gfx/range/range.h"
13 13
14 namespace content { 14 namespace content {
15 15
16 namespace { 16 namespace {
17 17
18 bool AreDifferentTextInputStates(const content::TextInputState& old_state, 18 bool AreDifferentTextInputStates(const content::TextInputState& old_state,
19 const content::TextInputState& new_state) { 19 const content::TextInputState& new_state) {
20 #if defined(USE_AURA) 20 #if defined(USE_AURA)
21 return old_state.type != new_state.type || old_state.mode != new_state.mode || 21 return old_state.type != new_state.type || old_state.mode != new_state.mode ||
22 old_state.flags != new_state.flags || 22 old_state.flags != new_state.flags ||
23 old_state.can_compose_inline != new_state.can_compose_inline; 23 old_state.can_compose_inline != new_state.can_compose_inline;
24 #elif defined(OS_MACOSX)
25 return old_state.type != new_state.type ||
26 old_state.can_compose_inline != new_state.can_compose_inline;
24 #else 27 #else
25 // TODO(ekaramad): Implement the logic for other platforms (crbug.com/578168). 28 // TODO(ekaramad): Implement the logic for other platforms (crbug.com/578168).
26 NOTREACHED(); 29 NOTREACHED();
27 return true; 30 return true;
28 #endif 31 #endif
29 } 32 }
30 33
31 } // namespace 34 } // namespace
32 35
33 TextInputManager::TextInputManager() : active_view_(nullptr) {} 36 TextInputManager::TextInputManager() : active_view_(nullptr) {}
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 270
268 TextInputManager::TextSelection::TextSelection() 271 TextInputManager::TextSelection::TextSelection()
269 : offset(0), range(gfx::Range::InvalidRange()), text(base::string16()) {} 272 : offset(0), range(gfx::Range::InvalidRange()), text(base::string16()) {}
270 273
271 TextInputManager::TextSelection::TextSelection(const TextSelection& other) = 274 TextInputManager::TextSelection::TextSelection(const TextSelection& other) =
272 default; 275 default;
273 276
274 TextInputManager::TextSelection::~TextSelection() {} 277 TextInputManager::TextSelection::~TextSelection() {}
275 278
276 } // namespace content 279 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698