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

Side by Side Diff: content/common/view_messages.h

Issue 659093002: Pass the size to the RenderView on creation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@java_enum
Patch Set: rebase Created 6 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 // 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/memory/shared_memory.h" 8 #include "base/memory/shared_memory.h"
9 #include "base/process/process.h" 9 #include "base/process/process.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 // ViewHostMsg_UpdateRect_Flags::IS_REPAINT_ACK 406 // ViewHostMsg_UpdateRect_Flags::IS_REPAINT_ACK
407 // Indicates that this is a response to a ViewMsg_Repaint message. 407 // Indicates that this is a response to a ViewMsg_Repaint message.
408 // 408 //
409 // If flags is zero, then this message corresponds to an unsolicited paint 409 // If flags is zero, then this message corresponds to an unsolicited paint
410 // request by the render view. Any of the above bits may be set in flags, 410 // request by the render view. Any of the above bits may be set in flags,
411 // which would indicate that this paint message is an ACK for multiple 411 // which would indicate that this paint message is an ACK for multiple
412 // request messages. 412 // request messages.
413 IPC_STRUCT_MEMBER(int, flags) 413 IPC_STRUCT_MEMBER(int, flags)
414 IPC_STRUCT_END() 414 IPC_STRUCT_END()
415 415
416 IPC_STRUCT_BEGIN(ViewMsg_Resize_Params)
417 // Information about the screen (dpi, depth, etc..).
418 IPC_STRUCT_MEMBER(blink::WebScreenInfo, screen_info)
419 // The size of the renderer.
420 IPC_STRUCT_MEMBER(gfx::Size, new_size)
421 // The size of the view's backing surface in non-DPI-adjusted pixels.
422 IPC_STRUCT_MEMBER(gfx::Size, physical_backing_size)
423 // The amount that the viewport size given to Blink was shrunk by the URL-bar
424 // (always 0 on platforms where URL-bar hiding isn't supported).
425 IPC_STRUCT_MEMBER(float, top_controls_layout_height)
426 // The size of the visible viewport, which may be smaller than the view if the
427 // view is partially occluded (e.g. by a virtual keyboard). The size is in
428 // DPI-adjusted pixels.
429 IPC_STRUCT_MEMBER(gfx::Size, visible_viewport_size)
430 // The resizer rect.
431 IPC_STRUCT_MEMBER(gfx::Rect, resizer_rect)
432 // Indicates whether a page is fullscreen or not.
433 IPC_STRUCT_MEMBER(bool, is_fullscreen)
434 IPC_STRUCT_END()
435
416 IPC_STRUCT_BEGIN(ViewMsg_New_Params) 436 IPC_STRUCT_BEGIN(ViewMsg_New_Params)
417 // Renderer-wide preferences. 437 // Renderer-wide preferences.
418 IPC_STRUCT_MEMBER(content::RendererPreferences, renderer_preferences) 438 IPC_STRUCT_MEMBER(content::RendererPreferences, renderer_preferences)
419 439
420 // Preferences for this view. 440 // Preferences for this view.
421 IPC_STRUCT_MEMBER(content::WebPreferences, web_preferences) 441 IPC_STRUCT_MEMBER(content::WebPreferences, web_preferences)
422 442
423 // The ID of the view to be created. 443 // The ID of the view to be created.
424 IPC_STRUCT_MEMBER(int32, view_id) 444 IPC_STRUCT_MEMBER(int32, view_id)
425 445
(...skipping 27 matching lines...) Expand all
453 IPC_STRUCT_MEMBER(bool, never_visible) 473 IPC_STRUCT_MEMBER(bool, never_visible)
454 474
455 // Whether the window associated with this view was created with an opener. 475 // Whether the window associated with this view was created with an opener.
456 IPC_STRUCT_MEMBER(bool, window_was_created_with_opener) 476 IPC_STRUCT_MEMBER(bool, window_was_created_with_opener)
457 477
458 // The initial page ID to use for this view, which must be larger than any 478 // The initial page ID to use for this view, which must be larger than any
459 // existing navigation that might be loaded in the view. Page IDs are unique 479 // existing navigation that might be loaded in the view. Page IDs are unique
460 // to a view and are only updated by the renderer after this initial value. 480 // to a view and are only updated by the renderer after this initial value.
461 IPC_STRUCT_MEMBER(int32, next_page_id) 481 IPC_STRUCT_MEMBER(int32, next_page_id)
462 482
463 // The properties of the screen associated with the view. 483 // The initial renderer size.
464 IPC_STRUCT_MEMBER(blink::WebScreenInfo, screen_info) 484 IPC_STRUCT_MEMBER(ViewMsg_Resize_Params, initial_size)
465 IPC_STRUCT_END() 485 IPC_STRUCT_END()
466 486
467 IPC_STRUCT_BEGIN(ViewMsg_PostMessage_Params) 487 IPC_STRUCT_BEGIN(ViewMsg_PostMessage_Params)
468 // Whether the data format is supplied as serialized script value, or as 488 // Whether the data format is supplied as serialized script value, or as
469 // a simple string. If it is a raw string, must be converted from string to a 489 // a simple string. If it is a raw string, must be converted from string to a
470 // WebSerializedScriptValue in renderer. 490 // WebSerializedScriptValue in renderer.
471 IPC_STRUCT_MEMBER(bool, is_data_raw_string) 491 IPC_STRUCT_MEMBER(bool, is_data_raw_string)
472 // The serialized script value. 492 // The serialized script value.
473 IPC_STRUCT_MEMBER(base::string16, data) 493 IPC_STRUCT_MEMBER(base::string16, data)
474 // When sent to the browser, this is the routing ID of the source frame in 494 // When sent to the browser, this is the routing ID of the source frame in
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 IPC_MESSAGE_ROUTED1(ViewMsg_UpdateWebPreferences, 577 IPC_MESSAGE_ROUTED1(ViewMsg_UpdateWebPreferences,
558 content::WebPreferences) 578 content::WebPreferences)
559 579
560 // Informs the renderer that the timezone has changed. 580 // Informs the renderer that the timezone has changed.
561 IPC_MESSAGE_CONTROL0(ViewMsg_TimezoneChange) 581 IPC_MESSAGE_CONTROL0(ViewMsg_TimezoneChange)
562 582
563 // Tells the render view to close. 583 // Tells the render view to close.
564 // Expects a Close_ACK message when finished. 584 // Expects a Close_ACK message when finished.
565 IPC_MESSAGE_ROUTED0(ViewMsg_Close) 585 IPC_MESSAGE_ROUTED0(ViewMsg_Close)
566 586
567 IPC_STRUCT_BEGIN(ViewMsg_Resize_Params)
568 IPC_STRUCT_MEMBER(blink::WebScreenInfo, screen_info)
569 IPC_STRUCT_MEMBER(gfx::Size, new_size)
570 IPC_STRUCT_MEMBER(gfx::Size, physical_backing_size)
571 IPC_STRUCT_MEMBER(float, top_controls_layout_height)
572 IPC_STRUCT_MEMBER(gfx::Size, visible_viewport_size)
573 IPC_STRUCT_MEMBER(gfx::Rect, resizer_rect)
574 IPC_STRUCT_MEMBER(bool, is_fullscreen)
575 IPC_STRUCT_END()
576
577 // Tells the render view to change its size. A ViewHostMsg_UpdateRect message 587 // Tells the render view to change its size. A ViewHostMsg_UpdateRect message
578 // is generated in response provided new_size is not empty and not equal to 588 // is generated in response provided new_size is not empty and not equal to
579 // the view's current size. The generated ViewHostMsg_UpdateRect message will 589 // the view's current size. The generated ViewHostMsg_UpdateRect message will
580 // have the IS_RESIZE_ACK flag set. It also receives the resizer rect so that 590 // have the IS_RESIZE_ACK flag set. It also receives the resizer rect so that
581 // we don't have to fetch it every time WebKit asks for it. 591 // we don't have to fetch it every time WebKit asks for it.
582 IPC_MESSAGE_ROUTED1(ViewMsg_Resize, 592 IPC_MESSAGE_ROUTED1(ViewMsg_Resize,
583 ViewMsg_Resize_Params /* params */) 593 ViewMsg_Resize_Params /* params */)
584 594
585 // Sent to inform the renderer of its screen device color profile. An empty 595 // Sent to inform the renderer of its screen device color profile. An empty
586 // profile tells the renderer use the default sRGB color profile. 596 // profile tells the renderer use the default sRGB color profile.
(...skipping 1060 matching lines...) Expand 10 before | Expand all | Expand 10 after
1647 // Since the browser keeps handles to the allocated transport DIBs, this 1657 // Since the browser keeps handles to the allocated transport DIBs, this
1648 // message is sent to tell the browser that it may release them when the 1658 // message is sent to tell the browser that it may release them when the
1649 // renderer is finished with them. 1659 // renderer is finished with them.
1650 IPC_MESSAGE_CONTROL1(ViewHostMsg_FreeTransportDIB, 1660 IPC_MESSAGE_CONTROL1(ViewHostMsg_FreeTransportDIB,
1651 TransportDIB::Id /* DIB id */) 1661 TransportDIB::Id /* DIB id */)
1652 #endif 1662 #endif
1653 1663
1654 // Adding a new message? Stick to the sort order above: first platform 1664 // Adding a new message? Stick to the sort order above: first platform
1655 // independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform 1665 // independent ViewMsg, then ifdefs for platform specific ViewMsg, then platform
1656 // independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg. 1666 // independent ViewHostMsg, then ifdefs for platform specific ViewHostMsg.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698