// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "content/renderer/render_view_impl.h"

#include "base/command_line.h"
#include "base/message_loop.h"
#include "cc/trees/layer_tree_host.h"
#include "content/renderer/gpu/render_widget_compositor.h"

namespace content {

void RenderViewImpl::OnUpdateTopControlsState(bool enable_hiding,
                                              bool enable_showing,
                                              bool animate) {
  DCHECK(compositor_);
  if (compositor_) {
    compositor_->UpdateTopControlsState(enable_hiding, enable_showing, animate);
  }
}

}  // namespace content

// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "content/renderer/render_view_impl.h"

#include "base/command_line.h"
#include "base/message_loop.h"
#include "cc/trees/layer_tree_host.h"
#include "content/renderer/gpu/render_widget_compositor.h"

namespace content {

void RenderViewImpl::OnUpdateTopControlsState(bool enable_hiding,
                                              bool enable_showing,
                                              bool animate) {
  // TODO(tedchoc): Investigate why messages are getting here before the
  //                compositor has been initialized.
  LOG_IF(WARNING, !compositor_) << "OnUpdateTopControlsState was unhandled.";
  if (compositor_)
    compositor_->UpdateTopControlsState(enable_hiding, enable_showing, animate);
}

}  // namespace content

Remove DCHECK on the compositor in OnEnableHidingTopControls.
Remove DCHECK on the compositor in OnEnableHidingTopControls.

It is crashing our tests.  Removing while I investigate whether these
IPCs are getting sent before the compositor was initialized or after it
died.

BUG=224511
NOTRY=true

Review URL: https://chromiumcodereview.appspot.com/13142006

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@191326 0039d316-1c4b-4281-b951-d872f2087c98
