OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "webkit/plugins/ppapi/ppapi_plugin_instance.h" | 5 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
788 instance_interface_->DidChangeView(pp_instance(), &pp_position, &pp_clip); | 788 instance_interface_->DidChangeView(pp_instance(), &pp_position, &pp_clip); |
789 } | 789 } |
790 | 790 |
791 void PluginInstance::SetWebKitFocus(bool has_focus) { | 791 void PluginInstance::SetWebKitFocus(bool has_focus) { |
792 if (has_webkit_focus_ == has_focus) | 792 if (has_webkit_focus_ == has_focus) |
793 return; | 793 return; |
794 | 794 |
795 bool old_plugin_focus = PluginHasFocus(); | 795 bool old_plugin_focus = PluginHasFocus(); |
796 has_webkit_focus_ = has_focus; | 796 has_webkit_focus_ = has_focus; |
797 if (PluginHasFocus() != old_plugin_focus) { | 797 if (PluginHasFocus() != old_plugin_focus) { |
| 798 delegate()->PluginFocusChanged(PluginHasFocus()); |
798 instance_interface_->DidChangeFocus(pp_instance(), | 799 instance_interface_->DidChangeFocus(pp_instance(), |
799 BoolToPPBool(PluginHasFocus())); | 800 BoolToPPBool(PluginHasFocus())); |
800 } | 801 } |
801 } | 802 } |
802 | 803 |
803 void PluginInstance::SetContentAreaFocus(bool has_focus) { | 804 void PluginInstance::SetContentAreaFocus(bool has_focus) { |
804 if (has_content_area_focus_ == has_focus) | 805 if (has_content_area_focus_ == has_focus) |
805 return; | 806 return; |
806 | 807 |
807 bool old_plugin_focus = PluginHasFocus(); | 808 bool old_plugin_focus = PluginHasFocus(); |
(...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1560 return found->second; | 1561 return found->second; |
1561 } | 1562 } |
1562 | 1563 |
1563 bool PluginInstance::IsFullPagePlugin() const { | 1564 bool PluginInstance::IsFullPagePlugin() const { |
1564 WebFrame* frame = container()->element().document().frame(); | 1565 WebFrame* frame = container()->element().document().frame(); |
1565 return frame->view()->mainFrame()->document().isPluginDocument(); | 1566 return frame->view()->mainFrame()->document().isPluginDocument(); |
1566 } | 1567 } |
1567 | 1568 |
1568 } // namespace ppapi | 1569 } // namespace ppapi |
1569 } // namespace webkit | 1570 } // namespace webkit |
OLD | NEW |