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

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

Issue 274453002: Remove RenderWidget::SetBackground, change IPC to pass a bool. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rm-setbackground: nomac Created 6 years, 7 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/input/synthetic_gesture_target_base.h" 10 #include "content/browser/renderer_host/input/synthetic_gesture_target_base.h"
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 360
361 namespace { 361 namespace {
362 362
363 // How many microseconds apart input events should be flushed. 363 // How many microseconds apart input events should be flushed.
364 const int kFlushInputRateInUs = 16666; 364 const int kFlushInputRateInUs = 16666;
365 365
366 } 366 }
367 367
368 RenderWidgetHostViewBase::RenderWidgetHostViewBase() 368 RenderWidgetHostViewBase::RenderWidgetHostViewBase()
369 : popup_type_(blink::WebPopupTypeNone), 369 : popup_type_(blink::WebPopupTypeNone),
370 background_opaque_(true),
370 mouse_locked_(false), 371 mouse_locked_(false),
371 showing_context_menu_(false), 372 showing_context_menu_(false),
372 selection_text_offset_(0), 373 selection_text_offset_(0),
373 selection_range_(gfx::Range::InvalidRange()), 374 selection_range_(gfx::Range::InvalidRange()),
374 current_device_scale_factor_(0), 375 current_device_scale_factor_(0),
375 current_display_rotation_(gfx::Display::ROTATE_0), 376 current_display_rotation_(gfx::Display::ROTATE_0),
376 pinch_zoom_enabled_(content::IsPinchToZoomEnabled()), 377 pinch_zoom_enabled_(content::IsPinchToZoomEnabled()),
377 renderer_frame_number_(0) { 378 renderer_frame_number_(0) {
378 } 379 }
379 380
380 RenderWidgetHostViewBase::~RenderWidgetHostViewBase() { 381 RenderWidgetHostViewBase::~RenderWidgetHostViewBase() {
381 DCHECK(!mouse_locked_); 382 DCHECK(!mouse_locked_);
382 } 383 }
383 384
384 bool RenderWidgetHostViewBase::OnMessageReceived(const IPC::Message& msg){ 385 bool RenderWidgetHostViewBase::OnMessageReceived(const IPC::Message& msg){
385 return false; 386 return false;
386 } 387 }
387 388
388 void RenderWidgetHostViewBase::SetBackground(const SkBitmap& background) { 389 void RenderWidgetHostViewBase::SetBackgroundOpaque(bool opaque) {
389 background_ = background; 390 background_opaque_ = opaque;
390 } 391 }
391 392
392 const SkBitmap& RenderWidgetHostViewBase::GetBackground() { 393 bool RenderWidgetHostViewBase::GetBackgroundOpaque() {
393 return background_; 394 return background_opaque_;
394 } 395 }
395 396
396 gfx::Size RenderWidgetHostViewBase::GetPhysicalBackingSize() const { 397 gfx::Size RenderWidgetHostViewBase::GetPhysicalBackingSize() const {
397 gfx::NativeView view = GetNativeView(); 398 gfx::NativeView view = GetNativeView();
398 gfx::Display display = 399 gfx::Display display =
399 gfx::Screen::GetScreenFor(view)->GetDisplayNearestWindow(view); 400 gfx::Screen::GetScreenFor(view)->GetDisplayNearestWindow(view);
400 return gfx::ToCeiledSize(gfx::ScaleSize(GetViewBounds().size(), 401 return gfx::ToCeiledSize(gfx::ScaleSize(GetViewBounds().size(),
401 display.device_scale_factor())); 402 display.device_scale_factor()));
402 } 403 }
403 404
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 598
598 gfx::Size RenderWidgetHostViewBase::GetVisibleViewportSize() const { 599 gfx::Size RenderWidgetHostViewBase::GetVisibleViewportSize() const {
599 return GetViewBounds().size(); 600 return GetViewBounds().size();
600 } 601 }
601 602
602 void RenderWidgetHostViewBase::SetInsets(const gfx::Insets& insets) { 603 void RenderWidgetHostViewBase::SetInsets(const gfx::Insets& insets) {
603 NOTIMPLEMENTED(); 604 NOTIMPLEMENTED();
604 } 605 }
605 606
606 } // namespace content 607 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698