OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). | 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
560 frame = &frame->LocalFrameRoot(); | 560 frame = &frame->LocalFrameRoot(); |
561 // If the frame is still being created, it might not yet have a WebWidget. | 561 // If the frame is still being created, it might not yet have a WebWidget. |
562 // FIXME: Is this the right thing to do? Is there a way to avoid having | 562 // FIXME: Is this the right thing to do? Is there a way to avoid having |
563 // a local frame root that doesn't have a WebWidget? During initialization | 563 // a local frame root that doesn't have a WebWidget? During initialization |
564 // there is no content to draw so this call serves no purpose. | 564 // there is no content to draw so this call serves no purpose. |
565 if (WebLocalFrameImpl::FromFrame(frame) && | 565 if (WebLocalFrameImpl::FromFrame(frame) && |
566 WebLocalFrameImpl::FromFrame(frame)->FrameWidget()) | 566 WebLocalFrameImpl::FromFrame(frame)->FrameWidget()) |
567 WebLocalFrameImpl::FromFrame(frame)->FrameWidget()->ScheduleAnimation(); | 567 WebLocalFrameImpl::FromFrame(frame)->FrameWidget()->ScheduleAnimation(); |
568 } | 568 } |
569 | 569 |
570 IntRect ChromeClientImpl::ViewportToScreen( | 570 IntRect ChromeClientImpl::ViewportToScreen(const IntRect& rect_in_viewport, |
571 const IntRect& rect_in_viewport, | 571 const FrameView* frame_view) const { |
572 const FrameViewBase* frame_view_base) const { | |
573 WebRect screen_rect(rect_in_viewport); | 572 WebRect screen_rect(rect_in_viewport); |
574 | 573 |
575 DCHECK(frame_view_base->IsFrameView()); | 574 LocalFrame& frame = frame_view->GetFrame().LocalFrameRoot(); |
576 const FrameView* view = ToFrameView(frame_view_base); | |
577 LocalFrame& frame = view->GetFrame().LocalFrameRoot(); | |
578 | 575 |
579 WebWidgetClient* client = | 576 WebWidgetClient* client = |
580 WebLocalFrameImpl::FromFrame(&frame)->FrameWidget()->Client(); | 577 WebLocalFrameImpl::FromFrame(&frame)->FrameWidget()->Client(); |
581 | 578 |
582 if (client) { | 579 if (client) { |
583 client->ConvertViewportToWindow(&screen_rect); | 580 client->ConvertViewportToWindow(&screen_rect); |
584 WebRect view_rect = client->ViewRect(); | 581 WebRect view_rect = client->ViewRect(); |
585 screen_rect.x += view_rect.x; | 582 screen_rect.x += view_rect.x; |
586 screen_rect.y += view_rect.y; | 583 screen_rect.y += view_rect.y; |
587 } | 584 } |
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1241 if (RuntimeEnabledFeatures::presentationEnabled()) | 1238 if (RuntimeEnabledFeatures::presentationEnabled()) |
1242 PresentationController::ProvideTo(frame, client->PresentationClient()); | 1239 PresentationController::ProvideTo(frame, client->PresentationClient()); |
1243 if (RuntimeEnabledFeatures::audioOutputDevicesEnabled()) { | 1240 if (RuntimeEnabledFeatures::audioOutputDevicesEnabled()) { |
1244 ProvideAudioOutputDeviceClientTo(frame, | 1241 ProvideAudioOutputDeviceClientTo(frame, |
1245 new AudioOutputDeviceClientImpl(frame)); | 1242 new AudioOutputDeviceClientImpl(frame)); |
1246 } | 1243 } |
1247 InstalledAppController::ProvideTo(frame, client->GetRelatedAppsFetcher()); | 1244 InstalledAppController::ProvideTo(frame, client->GetRelatedAppsFetcher()); |
1248 } | 1245 } |
1249 | 1246 |
1250 } // namespace blink | 1247 } // namespace blink |
OLD | NEW |