| 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 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 IPC_STRUCT_TRAITS_MEMBER(params) | 369 IPC_STRUCT_TRAITS_MEMBER(params) |
| 374 IPC_STRUCT_TRAITS_MEMBER(time) | 370 IPC_STRUCT_TRAITS_MEMBER(time) |
| 375 IPC_STRUCT_TRAITS_END() | 371 IPC_STRUCT_TRAITS_END() |
| 376 | 372 |
| 377 IPC_STRUCT_TRAITS_BEGIN(ui::SelectedFileInfo) | 373 IPC_STRUCT_TRAITS_BEGIN(ui::SelectedFileInfo) |
| 378 IPC_STRUCT_TRAITS_MEMBER(file_path) | 374 IPC_STRUCT_TRAITS_MEMBER(file_path) |
| 379 IPC_STRUCT_TRAITS_MEMBER(local_path) | 375 IPC_STRUCT_TRAITS_MEMBER(local_path) |
| 380 IPC_STRUCT_TRAITS_MEMBER(display_name) | 376 IPC_STRUCT_TRAITS_MEMBER(display_name) |
| 381 IPC_STRUCT_TRAITS_END() | 377 IPC_STRUCT_TRAITS_END() |
| 382 | 378 |
| 383 #if defined(OS_ANDROID) | |
| 384 IPC_STRUCT_TRAITS_BEGIN(webkit_media::MediaMetadataAndroid) | |
| 385 IPC_STRUCT_TRAITS_MEMBER(width) | |
| 386 IPC_STRUCT_TRAITS_MEMBER(height) | |
| 387 IPC_STRUCT_TRAITS_MEMBER(duration) | |
| 388 IPC_STRUCT_TRAITS_MEMBER(current_time) | |
| 389 IPC_STRUCT_TRAITS_MEMBER(paused) | |
| 390 IPC_STRUCT_TRAITS_MEMBER(can_pause) | |
| 391 IPC_STRUCT_TRAITS_MEMBER(can_seek_forward) | |
| 392 IPC_STRUCT_TRAITS_MEMBER(can_seek_backward) | |
| 393 IPC_STRUCT_TRAITS_END() | |
| 394 #endif | |
| 395 | |
| 396 IPC_STRUCT_BEGIN(ViewHostMsg_CreateWindow_Params) | 379 IPC_STRUCT_BEGIN(ViewHostMsg_CreateWindow_Params) |
| 397 // Routing ID of the view initiating the open. | 380 // Routing ID of the view initiating the open. |
| 398 IPC_STRUCT_MEMBER(int, opener_id) | 381 IPC_STRUCT_MEMBER(int, opener_id) |
| 399 | 382 |
| 400 // True if this open request came in the context of a user gesture. | 383 // True if this open request came in the context of a user gesture. |
| 401 IPC_STRUCT_MEMBER(bool, user_gesture) | 384 IPC_STRUCT_MEMBER(bool, user_gesture) |
| 402 | 385 |
| 403 // Type of window requested. | 386 // Type of window requested. |
| 404 IPC_STRUCT_MEMBER(WindowContainerType, window_container_type) | 387 IPC_STRUCT_MEMBER(WindowContainerType, window_container_type) |
| 405 | 388 |
| (...skipping 1986 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2392 // |active_rect| will contain the bounding box of the active find-in-page match | 2375 // |active_rect| will contain the bounding box of the active find-in-page match |
| 2393 // marker, in similarly normalized coords (or an empty rect if there isn't one). | 2376 // marker, in similarly normalized coords (or an empty rect if there isn't one). |
| 2394 IPC_MESSAGE_ROUTED3(ViewHostMsg_FindMatchRects_Reply, | 2377 IPC_MESSAGE_ROUTED3(ViewHostMsg_FindMatchRects_Reply, |
| 2395 int /* version */, | 2378 int /* version */, |
| 2396 std::vector<gfx::RectF> /* rects */, | 2379 std::vector<gfx::RectF> /* rects */, |
| 2397 gfx::RectF /* active_rect */) | 2380 gfx::RectF /* active_rect */) |
| 2398 | 2381 |
| 2399 // Start an android intent with the given URI. | 2382 // Start an android intent with the given URI. |
| 2400 IPC_MESSAGE_ROUTED1(ViewHostMsg_StartContentIntent, | 2383 IPC_MESSAGE_ROUTED1(ViewHostMsg_StartContentIntent, |
| 2401 GURL /* content_url */) | 2384 GURL /* content_url */) |
| 2402 | |
| 2403 // Messages for notifying the render process of media playback status ------- | |
| 2404 | |
| 2405 // Media buffering has updated. | |
| 2406 IPC_MESSAGE_ROUTED2(ViewMsg_MediaBufferingUpdate, | |
| 2407 int /* player_id */, | |
| 2408 int /* percent */) | |
| 2409 | |
| 2410 // A media playback error has occured. | |
| 2411 IPC_MESSAGE_ROUTED2(ViewMsg_MediaError, | |
| 2412 int /* player_id */, | |
| 2413 int /* error */) | |
| 2414 | |
| 2415 // Playback is completed. | |
| 2416 IPC_MESSAGE_ROUTED1(ViewMsg_MediaPlaybackCompleted, | |
| 2417 int /* player_id */) | |
| 2418 | |
| 2419 // Player is prepared. | |
| 2420 IPC_MESSAGE_ROUTED2(ViewMsg_MediaPrepared, | |
| 2421 int /* player_id */, | |
| 2422 base::TimeDelta /* duration */) | |
| 2423 | |
| 2424 // Media seek is completed. | |
| 2425 IPC_MESSAGE_ROUTED2(ViewMsg_MediaSeekCompleted, | |
| 2426 int /* player_id */, | |
| 2427 base::TimeDelta /* current_time */) | |
| 2428 | |
| 2429 // Video size has changed. | |
| 2430 IPC_MESSAGE_ROUTED3(ViewMsg_MediaVideoSizeChanged, | |
| 2431 int /* player_id */, | |
| 2432 int /* width */, | |
| 2433 int /* height */) | |
| 2434 | |
| 2435 // The current play time has updated. | |
| 2436 IPC_MESSAGE_ROUTED2(ViewMsg_MediaTimeUpdate, | |
| 2437 int /* player_id */, | |
| 2438 base::TimeDelta /* current_time */) | |
| 2439 | |
| 2440 // The player has been released. | |
| 2441 IPC_MESSAGE_ROUTED1(ViewMsg_MediaPlayerReleased, | |
| 2442 int /* player_id */) | |
| 2443 | |
| 2444 // Messages for controllering the media playback in browser process ---------- | |
| 2445 | |
| 2446 // Destroy the media player object. | |
| 2447 IPC_MESSAGE_ROUTED1(ViewHostMsg_DestroyMediaPlayer, | |
| 2448 int /* player_id */) | |
| 2449 | |
| 2450 // Destroy all the players. | |
| 2451 IPC_MESSAGE_ROUTED0(ViewHostMsg_DestroyAllMediaPlayers) | |
| 2452 | |
| 2453 // Initialize a media player object with the given player_id. | |
| 2454 IPC_MESSAGE_ROUTED3(ViewHostMsg_MediaPlayerInitialize, | |
| 2455 int /* player_id */, | |
| 2456 std::string /* url */, | |
| 2457 std::string /* first_party_for_cookies */) | |
| 2458 | |
| 2459 // Pause the player. | |
| 2460 IPC_MESSAGE_ROUTED1(ViewHostMsg_MediaPlayerPause, | |
| 2461 int /* player_id */) | |
| 2462 | |
| 2463 // Release player resources, but keep the object for future usage. | |
| 2464 IPC_MESSAGE_ROUTED1(ViewHostMsg_MediaPlayerRelease, | |
| 2465 int /* player_id */) | |
| 2466 | |
| 2467 // Perform a seek. | |
| 2468 IPC_MESSAGE_ROUTED2(ViewHostMsg_MediaPlayerSeek, | |
| 2469 int /* player_id */, | |
| 2470 base::TimeDelta /* time */) | |
| 2471 | |
| 2472 // Start the player for playback. | |
| 2473 IPC_MESSAGE_ROUTED1(ViewHostMsg_MediaPlayerStart, | |
| 2474 int /* player_id */) | |
| 2475 #endif | 2385 #endif |
| OLD | NEW |