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

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

Issue 16488: Add a new resizer corner overlay. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 10 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/gfx/native_widget_types.h" 7 #include "base/gfx/native_widget_types.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "chrome/browser/renderer_host/backing_store.h" 9 #include "chrome/browser/renderer_host/backing_store.h"
10 #include "chrome/browser/renderer_host/render_process_host.h" 10 #include "chrome/browser/renderer_host/render_process_host.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 157
158 // Avoid asking the RenderWidget to resize to its current size, since it 158 // Avoid asking the RenderWidget to resize to its current size, since it
159 // won't send us a PaintRect message in that case. 159 // won't send us a PaintRect message in that case.
160 if (new_size == current_size_) 160 if (new_size == current_size_)
161 return; 161 return;
162 162
163 // We don't expect to receive an ACK when the requested size is empty. 163 // We don't expect to receive an ACK when the requested size is empty.
164 if (!new_size.IsEmpty()) 164 if (!new_size.IsEmpty())
165 resize_ack_pending_ = true; 165 resize_ack_pending_ = true;
166 166
167 if (!Send(new ViewMsg_Resize(routing_id_, new_size))) 167 if (!Send(new ViewMsg_Resize(routing_id_, new_size,
168 GetRootWindowResizerRect())))
168 resize_ack_pending_ = false; 169 resize_ack_pending_ = false;
169 } 170 }
170 171
171 void RenderWidgetHost::Focus() { 172 void RenderWidgetHost::Focus() {
172 Send(new ViewMsg_SetFocus(routing_id_, true)); 173 Send(new ViewMsg_SetFocus(routing_id_, true));
173 } 174 }
174 175
175 void RenderWidgetHost::Blur() { 176 void RenderWidgetHost::Blur() {
176 Send(new ViewMsg_SetFocus(routing_id_, false)); 177 Send(new ViewMsg_SetFocus(routing_id_, false));
177 } 178 }
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 is_hidden_ = false; 324 is_hidden_ = false;
324 325
325 if (view_) { 326 if (view_) {
326 view_->RendererGone(); 327 view_->RendererGone();
327 view_ = NULL; // The View should be deleted by RendererGone. 328 view_ = NULL; // The View should be deleted by RendererGone.
328 } 329 }
329 330
330 BackingStoreManager::RemoveBackingStore(this); 331 BackingStoreManager::RemoveBackingStore(this);
331 } 332 }
332 333
334 gfx::Rect RenderWidgetHost::GetRootWindowResizerRect() const {
335 return gfx::Rect();
336 }
337
333 void RenderWidgetHost::Destroy() { 338 void RenderWidgetHost::Destroy() {
334 NotificationService::current()->Notify( 339 NotificationService::current()->Notify(
335 NotificationType::RENDER_WIDGET_HOST_DESTROYED, 340 NotificationType::RENDER_WIDGET_HOST_DESTROYED,
336 Source<RenderWidgetHost>(this), 341 Source<RenderWidgetHost>(this),
337 NotificationService::NoDetails()); 342 NotificationService::NoDetails());
338 343
339 // Tell the view to die. 344 // Tell the view to die.
340 // Note that in the process of the view shutting down, it can call a ton 345 // Note that in the process of the view shutting down, it can call a ton
341 // of other messages on us. So if you do any other deinitialization here, 346 // of other messages on us. So if you do any other deinitialization here,
342 // do it after this call to view_->Destroy(). 347 // do it after this call to view_->Destroy().
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 606
602 // TODO(darin): do we need to do something else if our backing store is not 607 // TODO(darin): do we need to do something else if our backing store is not
603 // the same size as the advertised view? maybe we just assume there is a 608 // the same size as the advertised view? maybe we just assume there is a
604 // full paint on its way? 609 // full paint on its way?
605 BackingStore* backing_store = BackingStoreManager::Lookup(this); 610 BackingStore* backing_store = BackingStoreManager::Lookup(this);
606 if (!backing_store || (backing_store->size() != view_size)) 611 if (!backing_store || (backing_store->size() != view_size))
607 return; 612 return;
608 backing_store->ScrollRect(process_->process().handle(), bitmap, bitmap_rect, 613 backing_store->ScrollRect(process_->process().handle(), bitmap, bitmap_rect,
609 dx, dy, clip_rect, view_size); 614 dx, dy, clip_rect, view_size);
610 } 615 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/render_widget_host.h ('k') | chrome/browser/renderer_host/render_widget_host_view_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698