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

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

Issue 24012002: Move Range code to gfx. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: d Created 7 years, 3 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_view_base.h" 5 #include "content/browser/renderer_host/render_widget_host_view_base.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "content/browser/accessibility/browser_accessibility_manager.h" 8 #include "content/browser/accessibility/browser_accessibility_manager.h"
9 #include "content/browser/gpu/gpu_data_manager_impl.h" 9 #include "content/browser/gpu/gpu_data_manager_impl.h"
10 #include "content/browser/renderer_host/basic_mouse_wheel_smooth_scroll_gesture. h" 10 #include "content/browser/renderer_host/basic_mouse_wheel_smooth_scroll_gesture. h"
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 EnumChildWindows(parent, DetachPluginWindowsCallbackInternal, NULL); 375 EnumChildWindows(parent, DetachPluginWindowsCallbackInternal, NULL);
376 } 376 }
377 377
378 #endif // OS_WIN 378 #endif // OS_WIN
379 379
380 RenderWidgetHostViewBase::RenderWidgetHostViewBase() 380 RenderWidgetHostViewBase::RenderWidgetHostViewBase()
381 : popup_type_(WebKit::WebPopupTypeNone), 381 : popup_type_(WebKit::WebPopupTypeNone),
382 mouse_locked_(false), 382 mouse_locked_(false),
383 showing_context_menu_(false), 383 showing_context_menu_(false),
384 selection_text_offset_(0), 384 selection_text_offset_(0),
385 selection_range_(ui::Range::InvalidRange()), 385 selection_range_(gfx::Range::InvalidRange()),
386 current_device_scale_factor_(0), 386 current_device_scale_factor_(0),
387 renderer_frame_number_(0) { 387 renderer_frame_number_(0) {
388 } 388 }
389 389
390 RenderWidgetHostViewBase::~RenderWidgetHostViewBase() { 390 RenderWidgetHostViewBase::~RenderWidgetHostViewBase() {
391 DCHECK(!mouse_locked_); 391 DCHECK(!mouse_locked_);
392 } 392 }
393 393
394 bool RenderWidgetHostViewBase::OnMessageReceived(const IPC::Message& msg){ 394 bool RenderWidgetHostViewBase::OnMessageReceived(const IPC::Message& msg){
395 return false; 395 return false;
(...skipping 14 matching lines...) Expand all
410 return gfx::ToCeiledSize(gfx::ScaleSize(GetViewBounds().size(), 410 return gfx::ToCeiledSize(gfx::ScaleSize(GetViewBounds().size(),
411 display.device_scale_factor())); 411 display.device_scale_factor()));
412 } 412 }
413 413
414 float RenderWidgetHostViewBase::GetOverdrawBottomHeight() const { 414 float RenderWidgetHostViewBase::GetOverdrawBottomHeight() const {
415 return 0.f; 415 return 0.f;
416 } 416 }
417 417
418 void RenderWidgetHostViewBase::SelectionChanged(const string16& text, 418 void RenderWidgetHostViewBase::SelectionChanged(const string16& text,
419 size_t offset, 419 size_t offset,
420 const ui::Range& range) { 420 const gfx::Range& range) {
421 selection_text_ = text; 421 selection_text_ = text;
422 selection_text_offset_ = offset; 422 selection_text_offset_ = offset;
423 selection_range_.set_start(range.start()); 423 selection_range_.set_start(range.start());
424 selection_range_.set_end(range.end()); 424 selection_range_.set_end(range.end());
425 } 425 }
426 426
427 bool RenderWidgetHostViewBase::IsShowingContextMenu() const { 427 bool RenderWidgetHostViewBase::IsShowingContextMenu() const {
428 return showing_context_menu_; 428 return showing_context_menu_;
429 } 429 }
430 430
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 555
556 uint32 RenderWidgetHostViewBase::RendererFrameNumber() { 556 uint32 RenderWidgetHostViewBase::RendererFrameNumber() {
557 return renderer_frame_number_; 557 return renderer_frame_number_;
558 } 558 }
559 559
560 void RenderWidgetHostViewBase::DidReceiveRendererFrame() { 560 void RenderWidgetHostViewBase::DidReceiveRendererFrame() {
561 ++renderer_frame_number_; 561 ++renderer_frame_number_;
562 } 562 }
563 563
564 } // namespace content 564 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698