OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/renderer/render_widget.h" | 5 #include "content/renderer/render_widget.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 1302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1313 | 1313 |
1314 // The status has changed. Tell the RenderThread about it. | 1314 // The status has changed. Tell the RenderThread about it. |
1315 is_hidden_ = hidden; | 1315 is_hidden_ = hidden; |
1316 if (is_hidden_) | 1316 if (is_hidden_) |
1317 RenderThread::Get()->WidgetHidden(); | 1317 RenderThread::Get()->WidgetHidden(); |
1318 else | 1318 else |
1319 RenderThread::Get()->WidgetRestored(); | 1319 RenderThread::Get()->WidgetRestored(); |
1320 } | 1320 } |
1321 | 1321 |
1322 void RenderWidget::WillToggleFullscreen() { | 1322 void RenderWidget::WillToggleFullscreen() { |
1323 #ifdef WEBKIT_HAS_NEW_FULLSCREEN_API | |
1324 if (!webwidget_) | 1323 if (!webwidget_) |
1325 return; | 1324 return; |
1326 | 1325 |
1327 if (is_fullscreen_) { | 1326 if (is_fullscreen_) { |
1328 webwidget_->willExitFullScreen(); | 1327 webwidget_->willExitFullScreen(); |
1329 } else { | 1328 } else { |
1330 webwidget_->willEnterFullScreen(); | 1329 webwidget_->willEnterFullScreen(); |
1331 } | 1330 } |
1332 #endif | |
1333 } | 1331 } |
1334 | 1332 |
1335 void RenderWidget::DidToggleFullscreen() { | 1333 void RenderWidget::DidToggleFullscreen() { |
1336 #ifdef WEBKIT_HAS_NEW_FULLSCREEN_API | |
1337 if (!webwidget_) | 1334 if (!webwidget_) |
1338 return; | 1335 return; |
1339 | 1336 |
1340 if (is_fullscreen_) { | 1337 if (is_fullscreen_) { |
1341 webwidget_->didEnterFullScreen(); | 1338 webwidget_->didEnterFullScreen(); |
1342 } else { | 1339 } else { |
1343 webwidget_->didExitFullScreen(); | 1340 webwidget_->didExitFullScreen(); |
1344 } | 1341 } |
1345 #endif | |
1346 } | 1342 } |
1347 | 1343 |
1348 void RenderWidget::SetBackground(const SkBitmap& background) { | 1344 void RenderWidget::SetBackground(const SkBitmap& background) { |
1349 background_ = background; | 1345 background_ = background; |
1350 | 1346 |
1351 // Generate a full repaint. | 1347 // Generate a full repaint. |
1352 didInvalidateRect(gfx::Rect(size_.width(), size_.height())); | 1348 didInvalidateRect(gfx::Rect(size_.width(), size_.height())); |
1353 } | 1349 } |
1354 | 1350 |
1355 bool RenderWidget::next_paint_is_resize_ack() const { | 1351 bool RenderWidget::next_paint_is_resize_ack() const { |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1503 } | 1499 } |
1504 } | 1500 } |
1505 | 1501 |
1506 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { | 1502 bool RenderWidget::WillHandleMouseEvent(const WebKit::WebMouseEvent& event) { |
1507 return false; | 1503 return false; |
1508 } | 1504 } |
1509 | 1505 |
1510 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { | 1506 bool RenderWidget::WebWidgetHandlesCompositorScheduling() const { |
1511 return false; | 1507 return false; |
1512 } | 1508 } |
OLD | NEW |