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

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

Issue 9347042: Introduce content::RenderWidgetHostViewPort (in content/port/browser). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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) 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_aura.h" 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "content/browser/renderer_host/backing_store_skia.h" 8 #include "content/browser/renderer_host/backing_store_skia.h"
9 #include "content/browser/renderer_host/render_widget_host.h" 9 #include "content/browser/renderer_host/render_widget_host.h"
10 #include "content/browser/renderer_host/web_input_event_aura.h" 10 #include "content/browser/renderer_host/web_input_event_aura.h"
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 // Don't call UpdateExternalTexture: it's possible that a new surface with 470 // Don't call UpdateExternalTexture: it's possible that a new surface with
471 // the same ID will be re-created right away, in which case we don't want to 471 // the same ID will be re-created right away, in which case we don't want to
472 // flip back and forth. Instead wait until we got the accelerated 472 // flip back and forth. Instead wait until we got the accelerated
473 // compositing deactivation. 473 // compositing deactivation.
474 } 474 }
475 image_transport_clients_.erase(surface_handle); 475 image_transport_clients_.erase(surface_handle);
476 } 476 }
477 #endif 477 #endif
478 478
479 void RenderWidgetHostViewAura::SetBackground(const SkBitmap& background) { 479 void RenderWidgetHostViewAura::SetBackground(const SkBitmap& background) {
480 RenderWidgetHostViewBase::SetBackground(background); 480 content::RenderWidgetHostViewBase::SetBackground(background);
481 host_->SetBackground(background); 481 host_->SetBackground(background);
482 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) 482 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT)
483 window_->layer()->SetFillsBoundsOpaquely(background.isOpaque()); 483 window_->layer()->SetFillsBoundsOpaquely(background.isOpaque());
484 #endif 484 #endif
485 } 485 }
486 486
487 void RenderWidgetHostViewAura::GetScreenInfo(WebKit::WebScreenInfo* results) { 487 void RenderWidgetHostViewAura::GetScreenInfo(WebKit::WebScreenInfo* results) {
488 GetDefaultScreenInfo(results); 488 GetDefaultScreenInfo(results);
489 } 489 }
490 490
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
1078 //////////////////////////////////////////////////////////////////////////////// 1078 ////////////////////////////////////////////////////////////////////////////////
1079 // RenderWidgetHostView, public: 1079 // RenderWidgetHostView, public:
1080 1080
1081 // static 1081 // static
1082 RenderWidgetHostView* RenderWidgetHostView::CreateViewForWidget( 1082 RenderWidgetHostView* RenderWidgetHostView::CreateViewForWidget(
1083 RenderWidgetHost* widget) { 1083 RenderWidgetHost* widget) {
1084 return new RenderWidgetHostViewAura(widget); 1084 return new RenderWidgetHostViewAura(widget);
1085 } 1085 }
1086 1086
1087 // static 1087 // static
1088 void RenderWidgetHostViewBase::GetDefaultScreenInfo( 1088 void content::RenderWidgetHostViewPort::GetDefaultScreenInfo(
1089 WebKit::WebScreenInfo* results) { 1089 WebKit::WebScreenInfo* results) {
1090 const gfx::Size size = gfx::Screen::GetPrimaryMonitorSize(); 1090 const gfx::Size size = gfx::Screen::GetPrimaryMonitorSize();
1091 results->rect = WebKit::WebRect(0, 0, size.width(), size.height()); 1091 results->rect = WebKit::WebRect(0, 0, size.width(), size.height());
1092 results->availableRect = results->rect; 1092 results->availableRect = results->rect;
1093 // TODO(derat): Don't hardcode this? 1093 // TODO(derat): Don't hardcode this?
1094 results->depth = 24; 1094 results->depth = 24;
1095 results->depthPerComponent = 8; 1095 results->depthPerComponent = 8;
1096 } 1096 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698