| OLD | NEW | 
|---|
| 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 413 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 424 void RenderWidgetHost::NotifyTextDirection() { | 424 void RenderWidgetHost::NotifyTextDirection() { | 
| 425   if (text_direction_updated_) { | 425   if (text_direction_updated_) { | 
| 426     if (!text_direction_canceled_) | 426     if (!text_direction_canceled_) | 
| 427       Send(new ViewMsg_SetTextDirection(routing_id(), | 427       Send(new ViewMsg_SetTextDirection(routing_id(), | 
| 428                                         static_cast<int>(text_direction_))); | 428                                         static_cast<int>(text_direction_))); | 
| 429     text_direction_updated_ = false; | 429     text_direction_updated_ = false; | 
| 430     text_direction_canceled_ = false; | 430     text_direction_canceled_ = false; | 
| 431   } | 431   } | 
| 432 } | 432 } | 
| 433 | 433 | 
|  | 434 void RenderWidgetHost::ImeSetInputMode(bool activate) { | 
|  | 435   Send(new ViewMsg_ImeSetInputMode(routing_id(), activate)); | 
|  | 436 } | 
|  | 437 | 
|  | 438 void RenderWidgetHost::ImeSetComposition(const std::wstring& ime_string, | 
|  | 439                                          int cursor_position, | 
|  | 440                                          int target_start, | 
|  | 441                                          int target_end) { | 
|  | 442   Send(new ViewMsg_ImeSetComposition(routing_id(), 0, cursor_position, | 
|  | 443                                      target_start, target_end, ime_string)); | 
|  | 444 } | 
|  | 445 | 
|  | 446 void RenderWidgetHost::ImeConfirmComposition(const std::wstring& ime_string) { | 
|  | 447   Send(new ViewMsg_ImeSetComposition(routing_id(), 1, -1, -1, -1, ime_string)); | 
|  | 448 } | 
|  | 449 | 
|  | 450 void RenderWidgetHost::ImeCancelComposition() { | 
|  | 451   std::wstring empty_string; | 
|  | 452   Send(new ViewMsg_ImeSetComposition(routing_id(), -1, -1, -1, -1, | 
|  | 453                                      empty_string)); | 
|  | 454 } | 
|  | 455 | 
| 434 gfx::Rect RenderWidgetHost::GetRootWindowResizerRect() const { | 456 gfx::Rect RenderWidgetHost::GetRootWindowResizerRect() const { | 
| 435   return gfx::Rect(); | 457   return gfx::Rect(); | 
| 436 } | 458 } | 
| 437 | 459 | 
| 438 void RenderWidgetHost::Destroy() { | 460 void RenderWidgetHost::Destroy() { | 
| 439   NotificationService::current()->Notify( | 461   NotificationService::current()->Notify( | 
| 440       NotificationType::RENDER_WIDGET_HOST_DESTROYED, | 462       NotificationType::RENDER_WIDGET_HOST_DESTROYED, | 
| 441       Source<RenderWidgetHost>(this), | 463       Source<RenderWidgetHost>(this), | 
| 442       NotificationService::NoDetails()); | 464       NotificationService::NoDetails()); | 
| 443 | 465 | 
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 770 | 792 | 
| 771   // TODO(darin): do we need to do something else if our backing store is not | 793   // TODO(darin): do we need to do something else if our backing store is not | 
| 772   // the same size as the advertised view?  maybe we just assume there is a | 794   // the same size as the advertised view?  maybe we just assume there is a | 
| 773   // full paint on its way? | 795   // full paint on its way? | 
| 774   BackingStore* backing_store = BackingStoreManager::Lookup(this); | 796   BackingStore* backing_store = BackingStoreManager::Lookup(this); | 
| 775   if (!backing_store || (backing_store->size() != view_size)) | 797   if (!backing_store || (backing_store->size() != view_size)) | 
| 776     return; | 798     return; | 
| 777   backing_store->ScrollRect(process_->process().handle(), bitmap, bitmap_rect, | 799   backing_store->ScrollRect(process_->process().handle(), bitmap, bitmap_rect, | 
| 778                             dx, dy, clip_rect, view_size); | 800                             dx, dy, clip_rect, view_size); | 
| 779 } | 801 } | 
| OLD | NEW | 
|---|