| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "content/renderer/render_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 4514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4525 | 4525 |
| 4526 void RenderFrameImpl::WasHidden() { | 4526 void RenderFrameImpl::WasHidden() { |
| 4527 FOR_EACH_OBSERVER(RenderFrameObserver, observers_, WasHidden()); | 4527 FOR_EACH_OBSERVER(RenderFrameObserver, observers_, WasHidden()); |
| 4528 | 4528 |
| 4529 #if defined(ENABLE_PLUGINS) | 4529 #if defined(ENABLE_PLUGINS) |
| 4530 for (auto* plugin : active_pepper_instances_) | 4530 for (auto* plugin : active_pepper_instances_) |
| 4531 plugin->PageVisibilityChanged(false); | 4531 plugin->PageVisibilityChanged(false); |
| 4532 #endif // ENABLE_PLUGINS | 4532 #endif // ENABLE_PLUGINS |
| 4533 | 4533 |
| 4534 if (GetWebFrame()->frameWidget()) { | 4534 if (GetWebFrame()->frameWidget()) { |
| 4535 static_cast<blink::WebFrameWidget*>(GetWebFrame()->frameWidget()) | 4535 GetWebFrame()->frameWidget()->setVisibilityState(visibilityState()); |
| 4536 ->setVisibilityState(visibilityState()); | |
| 4537 } | 4536 } |
| 4538 } | 4537 } |
| 4539 | 4538 |
| 4540 void RenderFrameImpl::WasShown() { | 4539 void RenderFrameImpl::WasShown() { |
| 4541 FOR_EACH_OBSERVER(RenderFrameObserver, observers_, WasShown()); | 4540 FOR_EACH_OBSERVER(RenderFrameObserver, observers_, WasShown()); |
| 4542 | 4541 |
| 4543 #if defined(ENABLE_PLUGINS) | 4542 #if defined(ENABLE_PLUGINS) |
| 4544 for (auto* plugin : active_pepper_instances_) | 4543 for (auto* plugin : active_pepper_instances_) |
| 4545 plugin->PageVisibilityChanged(true); | 4544 plugin->PageVisibilityChanged(true); |
| 4546 #endif // ENABLE_PLUGINS | 4545 #endif // ENABLE_PLUGINS |
| 4547 | 4546 |
| 4548 if (GetWebFrame()->frameWidget()) { | 4547 if (GetWebFrame()->frameWidget()) { |
| 4549 static_cast<blink::WebFrameWidget*>(GetWebFrame()->frameWidget()) | 4548 GetWebFrame()->frameWidget()->setVisibilityState(visibilityState()); |
| 4550 ->setVisibilityState(visibilityState()); | |
| 4551 } | 4549 } |
| 4552 } | 4550 } |
| 4553 | 4551 |
| 4554 void RenderFrameImpl::WidgetWillClose() { | 4552 void RenderFrameImpl::WidgetWillClose() { |
| 4555 FOR_EACH_OBSERVER(RenderFrameObserver, observers_, WidgetWillClose()); | 4553 FOR_EACH_OBSERVER(RenderFrameObserver, observers_, WidgetWillClose()); |
| 4556 } | 4554 } |
| 4557 | 4555 |
| 4558 bool RenderFrameImpl::IsMainFrame() { | 4556 bool RenderFrameImpl::IsMainFrame() { |
| 4559 return is_main_frame_; | 4557 return is_main_frame_; |
| 4560 } | 4558 } |
| (...skipping 1793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6354 // event target. Potentially a Pepper plugin will receive the event. | 6352 // event target. Potentially a Pepper plugin will receive the event. |
| 6355 // In order to tell whether a plugin gets the last mouse event and which it | 6353 // In order to tell whether a plugin gets the last mouse event and which it |
| 6356 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6354 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
| 6357 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6355 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
| 6358 // |pepper_last_mouse_event_target_|. | 6356 // |pepper_last_mouse_event_target_|. |
| 6359 pepper_last_mouse_event_target_ = nullptr; | 6357 pepper_last_mouse_event_target_ = nullptr; |
| 6360 #endif | 6358 #endif |
| 6361 } | 6359 } |
| 6362 | 6360 |
| 6363 } // namespace content | 6361 } // namespace content |
| OLD | NEW |