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

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

Issue 2383473002: [scheduler] Teach scheduler about audio state (Closed)
Patch Set: WebFrames! Created 4 years, 2 months 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 1535 matching lines...) Expand 10 before | Expand all | Expand 10 after
1546 IPC_MESSAGE_HANDLER(FrameMsg_GetSerializedHtmlWithLocalLinks, 1546 IPC_MESSAGE_HANDLER(FrameMsg_GetSerializedHtmlWithLocalLinks,
1547 OnGetSerializedHtmlWithLocalLinks) 1547 OnGetSerializedHtmlWithLocalLinks)
1548 IPC_MESSAGE_HANDLER(FrameMsg_SerializeAsMHTML, OnSerializeAsMHTML) 1548 IPC_MESSAGE_HANDLER(FrameMsg_SerializeAsMHTML, OnSerializeAsMHTML)
1549 IPC_MESSAGE_HANDLER(FrameMsg_Find, OnFind) 1549 IPC_MESSAGE_HANDLER(FrameMsg_Find, OnFind)
1550 IPC_MESSAGE_HANDLER(FrameMsg_ClearActiveFindMatch, OnClearActiveFindMatch) 1550 IPC_MESSAGE_HANDLER(FrameMsg_ClearActiveFindMatch, OnClearActiveFindMatch)
1551 IPC_MESSAGE_HANDLER(FrameMsg_StopFinding, OnStopFinding) 1551 IPC_MESSAGE_HANDLER(FrameMsg_StopFinding, OnStopFinding)
1552 IPC_MESSAGE_HANDLER(FrameMsg_EnableViewSourceMode, OnEnableViewSourceMode) 1552 IPC_MESSAGE_HANDLER(FrameMsg_EnableViewSourceMode, OnEnableViewSourceMode)
1553 IPC_MESSAGE_HANDLER(FrameMsg_SuppressFurtherDialogs, 1553 IPC_MESSAGE_HANDLER(FrameMsg_SuppressFurtherDialogs,
1554 OnSuppressFurtherDialogs) 1554 OnSuppressFurtherDialogs)
1555 IPC_MESSAGE_HANDLER(FrameMsg_RunFileChooserResponse, OnFileChooserResponse) 1555 IPC_MESSAGE_HANDLER(FrameMsg_RunFileChooserResponse, OnFileChooserResponse)
1556 IPC_MESSAGE_HANDLER(FrameMsg_AudioStateChanged, OnAudioStateChanged)
1556 #if defined(OS_ANDROID) 1557 #if defined(OS_ANDROID)
1557 IPC_MESSAGE_HANDLER(FrameMsg_ActivateNearestFindResult, 1558 IPC_MESSAGE_HANDLER(FrameMsg_ActivateNearestFindResult,
1558 OnActivateNearestFindResult) 1559 OnActivateNearestFindResult)
1559 IPC_MESSAGE_HANDLER(FrameMsg_GetNearestFindResult, 1560 IPC_MESSAGE_HANDLER(FrameMsg_GetNearestFindResult,
1560 OnGetNearestFindResult) 1561 OnGetNearestFindResult)
1561 IPC_MESSAGE_HANDLER(FrameMsg_FindMatchRects, OnFindMatchRects) 1562 IPC_MESSAGE_HANDLER(FrameMsg_FindMatchRects, OnFindMatchRects)
1562 #endif 1563 #endif
1563 1564
1564 #if defined(USE_EXTERNAL_POPUP_MENU) 1565 #if defined(USE_EXTERNAL_POPUP_MENU)
1565 #if defined(OS_MACOSX) 1566 #if defined(OS_MACOSX)
(...skipping 3778 matching lines...) Expand 10 before | Expand all | Expand 10 after
5344 } 5345 }
5345 file_chooser_completions_.pop_front(); 5346 file_chooser_completions_.pop_front();
5346 5347
5347 // If there are more pending file chooser requests, schedule one now. 5348 // If there are more pending file chooser requests, schedule one now.
5348 if (!file_chooser_completions_.empty()) { 5349 if (!file_chooser_completions_.empty()) {
5349 Send(new FrameHostMsg_RunFileChooser( 5350 Send(new FrameHostMsg_RunFileChooser(
5350 routing_id_, file_chooser_completions_.front()->params)); 5351 routing_id_, file_chooser_completions_.front()->params));
5351 } 5352 }
5352 } 5353 }
5353 5354
5355 void RenderFrameImpl::OnAudioStateChanged(bool is_audio_playing) {
5356 frame_->audioStateChanged(is_audio_playing);
5357 }
5358
5354 #if defined(OS_ANDROID) 5359 #if defined(OS_ANDROID)
5355 void RenderFrameImpl::OnActivateNearestFindResult(int request_id, 5360 void RenderFrameImpl::OnActivateNearestFindResult(int request_id,
5356 float x, 5361 float x,
5357 float y) { 5362 float y) {
5358 WebRect selection_rect; 5363 WebRect selection_rect;
5359 int ordinal = 5364 int ordinal =
5360 frame_->selectNearestFindMatch(WebFloatPoint(x, y), &selection_rect); 5365 frame_->selectNearestFindMatch(WebFloatPoint(x, y), &selection_rect);
5361 if (ordinal == -1) { 5366 if (ordinal == -1) {
5362 // Something went wrong, so send a no-op reply (force the frame to report 5367 // Something went wrong, so send a no-op reply (force the frame to report
5363 // the current match count) in case the host is waiting for a response due 5368 // the current match count) in case the host is waiting for a response due
(...skipping 1067 matching lines...) Expand 10 before | Expand all | Expand 10 after
6431 // event target. Potentially a Pepper plugin will receive the event. 6436 // event target. Potentially a Pepper plugin will receive the event.
6432 // In order to tell whether a plugin gets the last mouse event and which it 6437 // In order to tell whether a plugin gets the last mouse event and which it
6433 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6438 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6434 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6439 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6435 // |pepper_last_mouse_event_target_|. 6440 // |pepper_last_mouse_event_target_|.
6436 pepper_last_mouse_event_target_ = nullptr; 6441 pepper_last_mouse_event_target_ = nullptr;
6437 #endif 6442 #endif
6438 } 6443 }
6439 6444
6440 } // namespace content 6445 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698