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

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

Issue 775143003: cc: Implement unified BeginFrame on aura (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed brian's comment Created 6 years 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
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/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 474
475 bool RenderWidgetHostViewAura::OnMessageReceived( 475 bool RenderWidgetHostViewAura::OnMessageReceived(
476 const IPC::Message& message) { 476 const IPC::Message& message) {
477 bool handled = true; 477 bool handled = true;
478 IPC_BEGIN_MESSAGE_MAP(RenderWidgetHostViewAura, message) 478 IPC_BEGIN_MESSAGE_MAP(RenderWidgetHostViewAura, message)
479 // TODO(kevers): Move to RenderWidgetHostViewImpl and consolidate IPC 479 // TODO(kevers): Move to RenderWidgetHostViewImpl and consolidate IPC
480 // messages for TextInput<State|Type>Changed. Corresponding code in 480 // messages for TextInput<State|Type>Changed. Corresponding code in
481 // RenderWidgetHostViewAndroid should also be moved at the same time. 481 // RenderWidgetHostViewAndroid should also be moved at the same time.
482 IPC_MESSAGE_HANDLER(ViewHostMsg_TextInputStateChanged, 482 IPC_MESSAGE_HANDLER(ViewHostMsg_TextInputStateChanged,
483 OnTextInputStateChanged) 483 OnTextInputStateChanged)
484 IPC_MESSAGE_HANDLER(ViewHostMsg_SetNeedsBeginFrames,
485 OnSetNeedsBeginFrames)
484 IPC_MESSAGE_UNHANDLED(handled = false) 486 IPC_MESSAGE_UNHANDLED(handled = false)
485 IPC_END_MESSAGE_MAP() 487 IPC_END_MESSAGE_MAP()
486 return handled; 488 return handled;
487 } 489 }
488 490
489 void RenderWidgetHostViewAura::InitAsChild( 491 void RenderWidgetHostViewAura::InitAsChild(
490 gfx::NativeView parent_view) { 492 gfx::NativeView parent_view) {
491 window_->SetType(ui::wm::WINDOW_TYPE_CONTROL); 493 window_->SetType(ui::wm::WINDOW_TYPE_CONTROL);
492 window_->Init(aura::WINDOW_LAYER_SOLID_COLOR); 494 window_->Init(aura::WINDOW_LAYER_SOLID_COLOR);
493 window_->SetName("RenderWidgetHostViewAura"); 495 window_->SetName("RenderWidgetHostViewAura");
(...skipping 2023 matching lines...) Expand 10 before | Expand all | Expand 10 after
2517 } 2519 }
2518 #endif 2520 #endif
2519 2521
2520 host_->ForwardKeyboardEvent(event); 2522 host_->ForwardKeyboardEvent(event);
2521 } 2523 }
2522 2524
2523 SkColorType RenderWidgetHostViewAura::PreferredReadbackFormat() { 2525 SkColorType RenderWidgetHostViewAura::PreferredReadbackFormat() {
2524 return kN32_SkColorType; 2526 return kN32_SkColorType;
2525 } 2527 }
2526 2528
2529 void RenderWidgetHostViewAura::OnSetNeedsBeginFrames(bool needs_begin_frames) {
2530 delegated_frame_host_->OnSetNeedsBeginFrames(needs_begin_frames);
2531 }
2532
2527 //////////////////////////////////////////////////////////////////////////////// 2533 ////////////////////////////////////////////////////////////////////////////////
2528 // DelegatedFrameHost, public: 2534 // DelegatedFrameHostClient, public:
2529 2535
2530 ui::Compositor* RenderWidgetHostViewAura::GetCompositor() const { 2536 ui::Compositor* RenderWidgetHostViewAura::GetCompositor() const {
2531 aura::WindowTreeHost* host = window_->GetHost(); 2537 aura::WindowTreeHost* host = window_->GetHost();
2532 return host ? host->compositor() : NULL; 2538 return host ? host->compositor() : NULL;
2533 } 2539 }
2534 2540
2535 ui::Layer* RenderWidgetHostViewAura::GetLayer() { 2541 ui::Layer* RenderWidgetHostViewAura::GetLayer() {
2536 return window_->layer(); 2542 return window_->layer();
2537 } 2543 }
2538 2544
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
2573 2579
2574 //////////////////////////////////////////////////////////////////////////////// 2580 ////////////////////////////////////////////////////////////////////////////////
2575 // RenderWidgetHostViewBase, public: 2581 // RenderWidgetHostViewBase, public:
2576 2582
2577 // static 2583 // static
2578 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { 2584 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) {
2579 GetScreenInfoForWindow(results, NULL); 2585 GetScreenInfoForWindow(results, NULL);
2580 } 2586 }
2581 2587
2582 } // namespace content 2588 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698