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

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

Issue 222783004: Move textual replacement to WebContents. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
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_impl.h" 5 #include "content/browser/renderer_host/render_widget_host_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 1986 matching lines...) Expand 10 before | Expand all | Expand 10 after
1997 1997
1998 // TODO(darin): do we need to do something else if our backing store is not 1998 // TODO(darin): do we need to do something else if our backing store is not
1999 // the same size as the advertised view? maybe we just assume there is a 1999 // the same size as the advertised view? maybe we just assume there is a
2000 // full paint on its way? 2000 // full paint on its way?
2001 BackingStore* backing_store = BackingStoreManager::Lookup(this); 2001 BackingStore* backing_store = BackingStoreManager::Lookup(this);
2002 if (!backing_store || (backing_store->size() != view_size)) 2002 if (!backing_store || (backing_store->size() != view_size))
2003 return; 2003 return;
2004 backing_store->ScrollBackingStore(delta, clip_rect, view_size); 2004 backing_store->ScrollBackingStore(delta, clip_rect, view_size);
2005 } 2005 }
2006 2006
2007 void RenderWidgetHostImpl::Replace(const base::string16& word) {
2008 Send(new InputMsg_Replace(routing_id_, word));
2009 }
2010
2011 void RenderWidgetHostImpl::ReplaceMisspelling(const base::string16& word) {
2012 Send(new InputMsg_ReplaceMisspelling(routing_id_, word));
2013 }
2014
2015 void RenderWidgetHostImpl::SetIgnoreInputEvents(bool ignore_input_events) { 2007 void RenderWidgetHostImpl::SetIgnoreInputEvents(bool ignore_input_events) {
2016 ignore_input_events_ = ignore_input_events; 2008 ignore_input_events_ = ignore_input_events;
2017 } 2009 }
2018 2010
2019 bool RenderWidgetHostImpl::KeyPressListenersHandleEvent( 2011 bool RenderWidgetHostImpl::KeyPressListenersHandleEvent(
2020 const NativeWebKeyboardEvent& event) { 2012 const NativeWebKeyboardEvent& event) {
2021 if (event.skip_in_browser || event.type != WebKeyboardEvent::RawKeyDown) 2013 if (event.skip_in_browser || event.type != WebKeyboardEvent::RawKeyDown)
2022 return false; 2014 return false;
2023 2015
2024 for (size_t i = 0; i < key_press_event_callbacks_.size(); i++) { 2016 for (size_t i = 0; i < key_press_event_callbacks_.size(); i++) {
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
2551 } 2543 }
2552 } 2544 }
2553 2545
2554 SkBitmap::Config RenderWidgetHostImpl::PreferredReadbackFormat() { 2546 SkBitmap::Config RenderWidgetHostImpl::PreferredReadbackFormat() {
2555 if (view_) 2547 if (view_)
2556 return view_->PreferredReadbackFormat(); 2548 return view_->PreferredReadbackFormat();
2557 return SkBitmap::kARGB_8888_Config; 2549 return SkBitmap::kARGB_8888_Config;
2558 } 2550 }
2559 2551
2560 } // namespace content 2552 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.h ('k') | content/browser/renderer_host/render_widget_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698