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 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
558 frame = frame->LocalFrameRoot(); | 558 frame = frame->LocalFrameRoot(); |
559 // If the frame is still being created, it might not yet have a WebWidget. | 559 // If the frame is still being created, it might not yet have a WebWidget. |
560 // FIXME: Is this the right thing to do? Is there a way to avoid having | 560 // FIXME: Is this the right thing to do? Is there a way to avoid having |
561 // a local frame root that doesn't have a WebWidget? During initialization | 561 // a local frame root that doesn't have a WebWidget? During initialization |
562 // there is no content to draw so this call serves no purpose. | 562 // there is no content to draw so this call serves no purpose. |
563 if (WebLocalFrameImpl::FromFrame(frame) && | 563 if (WebLocalFrameImpl::FromFrame(frame) && |
564 WebLocalFrameImpl::FromFrame(frame)->FrameWidget()) | 564 WebLocalFrameImpl::FromFrame(frame)->FrameWidget()) |
565 WebLocalFrameImpl::FromFrame(frame)->FrameWidget()->ScheduleAnimation(); | 565 WebLocalFrameImpl::FromFrame(frame)->FrameWidget()->ScheduleAnimation(); |
566 } | 566 } |
567 | 567 |
568 IntRect ChromeClientImpl::ViewportToScreen( | 568 IntRect ChromeClientImpl::ViewportToScreen(const IntRect& rect_in_viewport, |
569 const IntRect& rect_in_viewport, | 569 const FrameView* frame_view) const { |
570 const FrameViewBase* frame_view_base) const { | |
571 WebRect screen_rect(rect_in_viewport); | 570 WebRect screen_rect(rect_in_viewport); |
572 | 571 |
573 DCHECK(frame_view_base->IsFrameView()); | 572 LocalFrame* frame = frame_view->GetFrame().LocalFrameRoot(); |
574 const FrameView* view = ToFrameView(frame_view_base); | |
575 LocalFrame* frame = view->GetFrame().LocalFrameRoot(); | |
576 | 573 |
577 WebWidgetClient* client = | 574 WebWidgetClient* client = |
578 WebLocalFrameImpl::FromFrame(frame)->FrameWidget()->Client(); | 575 WebLocalFrameImpl::FromFrame(frame)->FrameWidget()->Client(); |
579 | 576 |
580 if (client) { | 577 if (client) { |
581 client->ConvertViewportToWindow(&screen_rect); | 578 client->ConvertViewportToWindow(&screen_rect); |
582 WebRect view_rect = client->ViewRect(); | 579 WebRect view_rect = client->ViewRect(); |
583 screen_rect.x += view_rect.x; | 580 screen_rect.x += view_rect.x; |
584 screen_rect.y += view_rect.y; | 581 screen_rect.y += view_rect.y; |
585 } | 582 } |
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1239 if (RuntimeEnabledFeatures::presentationEnabled()) | 1236 if (RuntimeEnabledFeatures::presentationEnabled()) |
1240 PresentationController::ProvideTo(frame, client->PresentationClient()); | 1237 PresentationController::ProvideTo(frame, client->PresentationClient()); |
1241 if (RuntimeEnabledFeatures::audioOutputDevicesEnabled()) { | 1238 if (RuntimeEnabledFeatures::audioOutputDevicesEnabled()) { |
1242 ProvideAudioOutputDeviceClientTo(frame, | 1239 ProvideAudioOutputDeviceClientTo(frame, |
1243 new AudioOutputDeviceClientImpl(frame)); | 1240 new AudioOutputDeviceClientImpl(frame)); |
1244 } | 1241 } |
1245 InstalledAppController::ProvideTo(frame, client->GetRelatedAppsFetcher()); | 1242 InstalledAppController::ProvideTo(frame, client->GetRelatedAppsFetcher()); |
1246 } | 1243 } |
1247 | 1244 |
1248 } // namespace blink | 1245 } // namespace blink |
OLD | NEW |