| OLD | NEW |
| 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 // IPC messages for page rendering. | 5 // IPC messages for page rendering. |
| 6 // Multiply-included message file, hence no include guard. | 6 // Multiply-included message file, hence no include guard. |
| 7 | 7 |
| 8 #include "base/process.h" | 8 #include "base/process.h" |
| 9 #include "base/shared_memory.h" | 9 #include "base/shared_memory.h" |
| 10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 #include "ui/gfx/rect_f.h" | 47 #include "ui/gfx/rect_f.h" |
| 48 #include "webkit/glue/webcookie.h" | 48 #include "webkit/glue/webcookie.h" |
| 49 #include "webkit/glue/webmenuitem.h" | 49 #include "webkit/glue/webmenuitem.h" |
| 50 #include "webkit/glue/webpreferences.h" | 50 #include "webkit/glue/webpreferences.h" |
| 51 #include "webkit/plugins/npapi/webplugin.h" | 51 #include "webkit/plugins/npapi/webplugin.h" |
| 52 | 52 |
| 53 #if defined(OS_MACOSX) | 53 #if defined(OS_MACOSX) |
| 54 #include "content/common/mac/font_descriptor.h" | 54 #include "content/common/mac/font_descriptor.h" |
| 55 #endif | 55 #endif |
| 56 | 56 |
| 57 #if defined(OS_ANDROID) | |
| 58 #include "webkit/media/android/media_metadata_android.h" | |
| 59 #endif | |
| 60 | |
| 61 #undef IPC_MESSAGE_EXPORT | 57 #undef IPC_MESSAGE_EXPORT |
| 62 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 58 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
| 63 | 59 |
| 64 #define IPC_MESSAGE_START ViewMsgStart | 60 #define IPC_MESSAGE_START ViewMsgStart |
| 65 | 61 |
| 66 IPC_ENUM_TRAITS(AccessibilityMode) | 62 IPC_ENUM_TRAITS(AccessibilityMode) |
| 67 IPC_ENUM_TRAITS(ChannelLayout) | 63 IPC_ENUM_TRAITS(ChannelLayout) |
| 68 IPC_ENUM_TRAITS(CSSColors::CSSColorName) | 64 IPC_ENUM_TRAITS(CSSColors::CSSColorName) |
| 69 IPC_ENUM_TRAITS(NavigationGesture) | 65 IPC_ENUM_TRAITS(NavigationGesture) |
| 70 IPC_ENUM_TRAITS(ViewMsg_Navigate_Type::Value) | 66 IPC_ENUM_TRAITS(ViewMsg_Navigate_Type::Value) |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 IPC_STRUCT_TRAITS_MEMBER(params) | 364 IPC_STRUCT_TRAITS_MEMBER(params) |
| 369 IPC_STRUCT_TRAITS_MEMBER(time) | 365 IPC_STRUCT_TRAITS_MEMBER(time) |
| 370 IPC_STRUCT_TRAITS_END() | 366 IPC_STRUCT_TRAITS_END() |
| 371 | 367 |
| 372 IPC_STRUCT_TRAITS_BEGIN(ui::SelectedFileInfo) | 368 IPC_STRUCT_TRAITS_BEGIN(ui::SelectedFileInfo) |
| 373 IPC_STRUCT_TRAITS_MEMBER(file_path) | 369 IPC_STRUCT_TRAITS_MEMBER(file_path) |
| 374 IPC_STRUCT_TRAITS_MEMBER(local_path) | 370 IPC_STRUCT_TRAITS_MEMBER(local_path) |
| 375 IPC_STRUCT_TRAITS_MEMBER(display_name) | 371 IPC_STRUCT_TRAITS_MEMBER(display_name) |
| 376 IPC_STRUCT_TRAITS_END() | 372 IPC_STRUCT_TRAITS_END() |
| 377 | 373 |
| 378 #if defined(OS_ANDROID) | |
| 379 IPC_STRUCT_TRAITS_BEGIN(webkit_media::MediaMetadataAndroid) | |
| 380 IPC_STRUCT_TRAITS_MEMBER(width) | |
| 381 IPC_STRUCT_TRAITS_MEMBER(height) | |
| 382 IPC_STRUCT_TRAITS_MEMBER(duration) | |
| 383 IPC_STRUCT_TRAITS_MEMBER(current_time) | |
| 384 IPC_STRUCT_TRAITS_MEMBER(paused) | |
| 385 IPC_STRUCT_TRAITS_MEMBER(can_pause) | |
| 386 IPC_STRUCT_TRAITS_MEMBER(can_seek_forward) | |
| 387 IPC_STRUCT_TRAITS_MEMBER(can_seek_backward) | |
| 388 IPC_STRUCT_TRAITS_END() | |
| 389 #endif | |
| 390 | |
| 391 IPC_STRUCT_BEGIN(ViewHostMsg_CreateWindow_Params) | 374 IPC_STRUCT_BEGIN(ViewHostMsg_CreateWindow_Params) |
| 392 // Routing ID of the view initiating the open. | 375 // Routing ID of the view initiating the open. |
| 393 IPC_STRUCT_MEMBER(int, opener_id) | 376 IPC_STRUCT_MEMBER(int, opener_id) |
| 394 | 377 |
| 395 // True if this open request came in the context of a user gesture. | 378 // True if this open request came in the context of a user gesture. |
| 396 IPC_STRUCT_MEMBER(bool, user_gesture) | 379 IPC_STRUCT_MEMBER(bool, user_gesture) |
| 397 | 380 |
| 398 // Type of window requested. | 381 // Type of window requested. |
| 399 IPC_STRUCT_MEMBER(WindowContainerType, window_container_type) | 382 IPC_STRUCT_MEMBER(WindowContainerType, window_container_type) |
| 400 | 383 |
| (...skipping 1986 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2387 // |active_rect| will contain the bounding box of the active find-in-page match | 2370 // |active_rect| will contain the bounding box of the active find-in-page match |
| 2388 // marker, in similarly normalized coords (or an empty rect if there isn't one). | 2371 // marker, in similarly normalized coords (or an empty rect if there isn't one). |
| 2389 IPC_MESSAGE_ROUTED3(ViewHostMsg_FindMatchRects_Reply, | 2372 IPC_MESSAGE_ROUTED3(ViewHostMsg_FindMatchRects_Reply, |
| 2390 int /* version */, | 2373 int /* version */, |
| 2391 std::vector<gfx::RectF> /* rects */, | 2374 std::vector<gfx::RectF> /* rects */, |
| 2392 gfx::RectF /* active_rect */) | 2375 gfx::RectF /* active_rect */) |
| 2393 | 2376 |
| 2394 // Start an android intent with the given URI. | 2377 // Start an android intent with the given URI. |
| 2395 IPC_MESSAGE_ROUTED1(ViewHostMsg_StartContentIntent, | 2378 IPC_MESSAGE_ROUTED1(ViewHostMsg_StartContentIntent, |
| 2396 GURL /* content_url */) | 2379 GURL /* content_url */) |
| 2397 | |
| 2398 // Messages for notifying the render process of media playback status ------- | |
| 2399 | |
| 2400 // Media buffering has updated. | |
| 2401 IPC_MESSAGE_ROUTED2(ViewMsg_MediaBufferingUpdate, | |
| 2402 int /* player_id */, | |
| 2403 int /* percent */) | |
| 2404 | |
| 2405 // A media playback error has occured. | |
| 2406 IPC_MESSAGE_ROUTED2(ViewMsg_MediaError, | |
| 2407 int /* player_id */, | |
| 2408 int /* error */) | |
| 2409 | |
| 2410 // Playback is completed. | |
| 2411 IPC_MESSAGE_ROUTED1(ViewMsg_MediaPlaybackCompleted, | |
| 2412 int /* player_id */) | |
| 2413 | |
| 2414 // Player is prepared. | |
| 2415 IPC_MESSAGE_ROUTED2(ViewMsg_MediaPrepared, | |
| 2416 int /* player_id */, | |
| 2417 base::TimeDelta /* duration */) | |
| 2418 | |
| 2419 // Media seek is completed. | |
| 2420 IPC_MESSAGE_ROUTED2(ViewMsg_MediaSeekCompleted, | |
| 2421 int /* player_id */, | |
| 2422 base::TimeDelta /* current_time */) | |
| 2423 | |
| 2424 // Video size has changed. | |
| 2425 IPC_MESSAGE_ROUTED3(ViewMsg_MediaVideoSizeChanged, | |
| 2426 int /* player_id */, | |
| 2427 int /* width */, | |
| 2428 int /* height */) | |
| 2429 | |
| 2430 // The current play time has updated. | |
| 2431 IPC_MESSAGE_ROUTED2(ViewMsg_MediaTimeUpdate, | |
| 2432 int /* player_id */, | |
| 2433 base::TimeDelta /* current_time */) | |
| 2434 | |
| 2435 // The player has been released. | |
| 2436 IPC_MESSAGE_ROUTED1(ViewMsg_MediaPlayerReleased, | |
| 2437 int /* player_id */) | |
| 2438 | |
| 2439 // Messages for controllering the media playback in browser process ---------- | |
| 2440 | |
| 2441 // Destroy the media player object. | |
| 2442 IPC_MESSAGE_ROUTED1(ViewHostMsg_DestroyMediaPlayer, | |
| 2443 int /* player_id */) | |
| 2444 | |
| 2445 // Destroy all the players. | |
| 2446 IPC_MESSAGE_ROUTED0(ViewHostMsg_DestroyAllMediaPlayers) | |
| 2447 | |
| 2448 // Initialize a media player object with the given player_id. | |
| 2449 IPC_MESSAGE_ROUTED3(ViewHostMsg_MediaPlayerInitialize, | |
| 2450 int /* player_id */, | |
| 2451 std::string /* url */, | |
| 2452 std::string /* first_party_for_cookies */) | |
| 2453 | |
| 2454 // Pause the player. | |
| 2455 IPC_MESSAGE_ROUTED1(ViewHostMsg_MediaPlayerPause, | |
| 2456 int /* player_id */) | |
| 2457 | |
| 2458 // Release player resources, but keep the object for future usage. | |
| 2459 IPC_MESSAGE_ROUTED1(ViewHostMsg_MediaPlayerRelease, | |
| 2460 int /* player_id */) | |
| 2461 | |
| 2462 // Perform a seek. | |
| 2463 IPC_MESSAGE_ROUTED2(ViewHostMsg_MediaPlayerSeek, | |
| 2464 int /* player_id */, | |
| 2465 base::TimeDelta /* time */) | |
| 2466 | |
| 2467 // Start the player for playback. | |
| 2468 IPC_MESSAGE_ROUTED1(ViewHostMsg_MediaPlayerStart, | |
| 2469 int /* player_id */) | |
| 2470 #endif | 2380 #endif |
| OLD | NEW |