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

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 2483843002: Revert of [scheduler] Teach scheduler about audio state (Closed)
Patch Set: Rebase Created 4 years, 1 month 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/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 1345 matching lines...) Expand 10 before | Expand all | Expand 10 after
1356 1356
1357 // Page messages. 1357 // Page messages.
1358 IPC_MESSAGE_HANDLER(PageMsg_UpdateWindowScreenRect, 1358 IPC_MESSAGE_HANDLER(PageMsg_UpdateWindowScreenRect,
1359 OnUpdateWindowScreenRect) 1359 OnUpdateWindowScreenRect)
1360 IPC_MESSAGE_HANDLER(PageMsg_SetZoomLevel, OnSetZoomLevel) 1360 IPC_MESSAGE_HANDLER(PageMsg_SetZoomLevel, OnSetZoomLevel)
1361 IPC_MESSAGE_HANDLER(PageMsg_SetDeviceScaleFactor, OnSetDeviceScaleFactor); 1361 IPC_MESSAGE_HANDLER(PageMsg_SetDeviceScaleFactor, OnSetDeviceScaleFactor);
1362 IPC_MESSAGE_HANDLER(PageMsg_WasHidden, OnPageWasHidden) 1362 IPC_MESSAGE_HANDLER(PageMsg_WasHidden, OnPageWasHidden)
1363 IPC_MESSAGE_HANDLER(PageMsg_WasShown, OnPageWasShown) 1363 IPC_MESSAGE_HANDLER(PageMsg_WasShown, OnPageWasShown)
1364 IPC_MESSAGE_HANDLER(PageMsg_SetHistoryOffsetAndLength, 1364 IPC_MESSAGE_HANDLER(PageMsg_SetHistoryOffsetAndLength,
1365 OnSetHistoryOffsetAndLength) 1365 OnSetHistoryOffsetAndLength)
1366 IPC_MESSAGE_HANDLER(PageMsg_AudioStateChanged, OnAudioStateChanged)
1367 1366
1368 #if defined(OS_ANDROID) 1367 #if defined(OS_ANDROID)
1369 IPC_MESSAGE_HANDLER(ViewMsg_UpdateBrowserControlsState, 1368 IPC_MESSAGE_HANDLER(ViewMsg_UpdateBrowserControlsState,
1370 OnUpdateBrowserControlsState) 1369 OnUpdateBrowserControlsState)
1371 IPC_MESSAGE_HANDLER(ViewMsg_ExtractSmartClipData, OnExtractSmartClipData) 1370 IPC_MESSAGE_HANDLER(ViewMsg_ExtractSmartClipData, OnExtractSmartClipData)
1372 #elif defined(OS_MACOSX) 1371 #elif defined(OS_MACOSX)
1373 IPC_MESSAGE_HANDLER(ViewMsg_GetRenderedText, 1372 IPC_MESSAGE_HANDLER(ViewMsg_GetRenderedText,
1374 OnGetRenderedText) 1373 OnGetRenderedText)
1375 IPC_MESSAGE_HANDLER(ViewMsg_Close, OnClose) 1374 IPC_MESSAGE_HANDLER(ViewMsg_Close, OnClose)
1376 #endif 1375 #endif
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
1448 void RenderViewImpl::OnSetInitialFocus(bool reverse) { 1447 void RenderViewImpl::OnSetInitialFocus(bool reverse) {
1449 if (!webview()) 1448 if (!webview())
1450 return; 1449 return;
1451 webview()->setInitialFocus(reverse); 1450 webview()->setInitialFocus(reverse);
1452 } 1451 }
1453 1452
1454 void RenderViewImpl::OnUpdateWindowScreenRect(gfx::Rect window_screen_rect) { 1453 void RenderViewImpl::OnUpdateWindowScreenRect(gfx::Rect window_screen_rect) {
1455 RenderWidget::OnUpdateWindowScreenRect(window_screen_rect); 1454 RenderWidget::OnUpdateWindowScreenRect(window_screen_rect);
1456 } 1455 }
1457 1456
1458 void RenderViewImpl::OnAudioStateChanged(bool is_audio_playing) {
1459 webview()->audioStateChanged(is_audio_playing);
1460 }
1461
1462 /////////////////////////////////////////////////////////////////////////////// 1457 ///////////////////////////////////////////////////////////////////////////////
1463 1458
1464 void RenderViewImpl::SendUpdateState() { 1459 void RenderViewImpl::SendUpdateState() {
1465 // We don't use this path in OOPIF-enabled modes. 1460 // We don't use this path in OOPIF-enabled modes.
1466 DCHECK(!SiteIsolationPolicy::UseSubframeNavigationEntries()); 1461 DCHECK(!SiteIsolationPolicy::UseSubframeNavigationEntries());
1467 1462
1468 HistoryEntry* entry = history_controller_->GetCurrentEntry(); 1463 HistoryEntry* entry = history_controller_->GetCurrentEntry();
1469 if (!entry) 1464 if (!entry)
1470 return; 1465 return;
1471 1466
(...skipping 1523 matching lines...) Expand 10 before | Expand all | Expand 10 after
2995 NotifyInputEventHandled(input_event->type, 2990 NotifyInputEventHandled(input_event->type,
2996 INPUT_EVENT_ACK_STATE_NOT_CONSUMED); 2991 INPUT_EVENT_ACK_STATE_NOT_CONSUMED);
2997 } 2992 }
2998 2993
2999 std::unique_ptr<InputEventAck> ack( 2994 std::unique_ptr<InputEventAck> ack(
3000 new InputEventAck(input_event->type, INPUT_EVENT_ACK_STATE_NOT_CONSUMED)); 2995 new InputEventAck(input_event->type, INPUT_EVENT_ACK_STATE_NOT_CONSUMED));
3001 OnInputEventAck(std::move(ack)); 2996 OnInputEventAck(std::move(ack));
3002 } 2997 }
3003 2998
3004 } // namespace content 2999 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698