~zaspire/oxide/MediaAccessPermissionRequest

« back to all changes in this revision

Viewing changes to shared/renderer/oxide_top_controls_handler.cc

  • Committer: Chris Coulson
  • Date: 2015-03-12 09:56:55 UTC
  • mfrom: (640.1.217 canary)
  • Revision ID: chris.coulson@canonical.com-20150312095655-3tp6r5a3zc5aqd0l
Bump Qt version to 1.7 and Chromium rev to 43.0.2327.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 
18
18
#include "oxide_top_controls_handler.h"
19
19
 
20
 
#include "base/logging.h"
21
 
#include "content/renderer/gpu/render_widget_compositor.h"
22
 
#include "content/renderer/render_view_impl.h"
23
 
#include "content/renderer/render_widget.h"
 
20
#include "content/public/renderer/render_view.h"
 
21
#include "third_party/WebKit/public/web/WebView.h"
24
22
 
25
23
#include "shared/common/oxide_messages.h"
26
24
 
27
25
namespace oxide {
28
26
 
29
 
content::RenderWidgetCompositor*
30
 
TopControlsHandler::GetRenderWidgetCompositor() const {
31
 
  return static_cast<content::RenderWidget*>(
32
 
      static_cast<content::RenderViewImpl*>(render_view()))->compositor();
33
 
}
34
 
 
35
27
void TopControlsHandler::OnUpdateTopControlsState(
36
 
    cc::TopControlsState constraints,
37
 
    cc::TopControlsState current,
 
28
    blink::WebTopControlsState constraints,
 
29
    blink::WebTopControlsState current,
38
30
    bool animate) {
39
 
  content::RenderWidgetCompositor* compositor = GetRenderWidgetCompositor();
40
 
  if (!compositor) {
 
31
  blink::WebView* view = render_view()->GetWebView();
 
32
  if (!view) {
41
33
    return;
42
34
  }
43
35
 
44
 
  compositor->UpdateTopControlsState(constraints, current, animate);
 
36
  view->updateTopControlsState(constraints, current, animate);
45
37
}
46
38
 
47
39
bool TopControlsHandler::OnMessageReceived(const IPC::Message& message) {