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

Side by Side Diff: chrome/browser/renderer_host/render_widget_host.cc

Issue 122002: Moving the WM_SETFOCUS message processing out of FocusManager (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_widget_host.h" 5 #include "chrome/browser/renderer_host/render_widget_host.h"
6 6
7 #include "base/histogram.h" 7 #include "base/histogram.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/keyboard_codes.h" 9 #include "base/keyboard_codes.h"
10 #include "chrome/browser/renderer_host/backing_store.h" 10 #include "chrome/browser/renderer_host/backing_store.h"
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 181
182 // We don't expect to receive an ACK when the requested size is empty. 182 // We don't expect to receive an ACK when the requested size is empty.
183 if (!new_size.IsEmpty()) 183 if (!new_size.IsEmpty())
184 resize_ack_pending_ = true; 184 resize_ack_pending_ = true;
185 185
186 if (!Send(new ViewMsg_Resize(routing_id_, new_size, 186 if (!Send(new ViewMsg_Resize(routing_id_, new_size,
187 GetRootWindowResizerRect()))) 187 GetRootWindowResizerRect())))
188 resize_ack_pending_ = false; 188 resize_ack_pending_ = false;
189 } 189 }
190 190
191 void RenderWidgetHost::GotFocus() {
192 Focus();
193 }
194
191 void RenderWidgetHost::Focus() { 195 void RenderWidgetHost::Focus() {
192 Send(new ViewMsg_SetFocus(routing_id_, true)); 196 Send(new ViewMsg_SetFocus(routing_id_, true));
193 } 197 }
194 198
195 void RenderWidgetHost::Blur() { 199 void RenderWidgetHost::Blur() {
196 Send(new ViewMsg_SetFocus(routing_id_, false)); 200 Send(new ViewMsg_SetFocus(routing_id_, false));
197 } 201 }
198 202
199 void RenderWidgetHost::LostCapture() { 203 void RenderWidgetHost::LostCapture() {
200 Send(new ViewMsg_MouseCaptureLost(routing_id_)); 204 Send(new ViewMsg_MouseCaptureLost(routing_id_));
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 736
733 // TODO(darin): do we need to do something else if our backing store is not 737 // TODO(darin): do we need to do something else if our backing store is not
734 // the same size as the advertised view? maybe we just assume there is a 738 // the same size as the advertised view? maybe we just assume there is a
735 // full paint on its way? 739 // full paint on its way?
736 BackingStore* backing_store = BackingStoreManager::Lookup(this); 740 BackingStore* backing_store = BackingStoreManager::Lookup(this);
737 if (!backing_store || (backing_store->size() != view_size)) 741 if (!backing_store || (backing_store->size() != view_size))
738 return; 742 return;
739 backing_store->ScrollRect(process_->process().handle(), bitmap, bitmap_rect, 743 backing_store->ScrollRect(process_->process().handle(), bitmap, bitmap_rect,
740 dx, dy, clip_rect, view_size); 744 dx, dy, clip_rect, view_size);
741 } 745 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/render_widget_host.h ('k') | chrome/browser/renderer_host/render_widget_host_view_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698