| OLD | NEW |
| 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 #include "content/renderer/browser_plugin/browser_plugin.h" | 5 #include "content/renderer/browser_plugin/browser_plugin.h" |
| 6 | 6 |
| 7 #include "base/json/json_string_value_serializer.h" | 7 #include "base/json/json_string_value_serializer.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "base/string_number_conversions.h" | 9 #include "base/string_number_conversions.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 damage_buffer_sequence_id_(0), | 117 damage_buffer_sequence_id_(0), |
| 118 resize_ack_received_(true), | 118 resize_ack_received_(true), |
| 119 sad_guest_(NULL), | 119 sad_guest_(NULL), |
| 120 guest_crashed_(false), | 120 guest_crashed_(false), |
| 121 navigate_src_sent_(false), | 121 navigate_src_sent_(false), |
| 122 auto_size_(false), | 122 auto_size_(false), |
| 123 max_height_(0), | 123 max_height_(0), |
| 124 max_width_(0), | 124 max_width_(0), |
| 125 min_height_(0), | 125 min_height_(0), |
| 126 min_width_(0), | 126 min_width_(0), |
| 127 process_id_(-1), | 127 guest_process_id_(-1), |
| 128 guest_route_id_(-1), |
| 128 persist_storage_(false), | 129 persist_storage_(false), |
| 129 valid_partition_id_(true), | 130 valid_partition_id_(true), |
| 130 content_window_routing_id_(MSG_ROUTING_NONE), | 131 content_window_routing_id_(MSG_ROUTING_NONE), |
| 131 plugin_focused_(false), | 132 plugin_focused_(false), |
| 132 visible_(true), | 133 visible_(true), |
| 133 size_changed_in_flight_(false), | 134 size_changed_in_flight_(false), |
| 134 allocate_instance_id_sent_(false), | 135 allocate_instance_id_sent_(false), |
| 135 browser_plugin_manager_(render_view->browser_plugin_manager()), | 136 browser_plugin_manager_(render_view->browser_plugin_manager()), |
| 136 current_nav_entry_index_(0), | 137 current_nav_entry_index_(0), |
| 137 nav_entry_count_(0), | 138 nav_entry_count_(0), |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 void BrowserPlugin::OnLoadCommit( | 421 void BrowserPlugin::OnLoadCommit( |
| 421 int instance_id, | 422 int instance_id, |
| 422 const BrowserPluginMsg_LoadCommit_Params& params) { | 423 const BrowserPluginMsg_LoadCommit_Params& params) { |
| 423 // If the guest has just committed a new navigation then it is no longer | 424 // If the guest has just committed a new navigation then it is no longer |
| 424 // crashed. | 425 // crashed. |
| 425 guest_crashed_ = false; | 426 guest_crashed_ = false; |
| 426 if (params.is_top_level) { | 427 if (params.is_top_level) { |
| 427 src_ = params.url.spec(); | 428 src_ = params.url.spec(); |
| 428 UpdateDOMAttribute(kSrc, src_.c_str()); | 429 UpdateDOMAttribute(kSrc, src_.c_str()); |
| 429 } | 430 } |
| 430 process_id_ = params.process_id; | 431 guest_process_id_ = params.process_id; |
| 432 guest_route_id_ = params.route_id; |
| 431 current_nav_entry_index_ = params.current_entry_index; | 433 current_nav_entry_index_ = params.current_entry_index; |
| 432 nav_entry_count_ = params.entry_count; | 434 nav_entry_count_ = params.entry_count; |
| 433 | 435 |
| 434 std::map<std::string, base::Value*> props; | 436 std::map<std::string, base::Value*> props; |
| 435 props[kURL] = base::Value::CreateStringValue(params.url.spec()); | 437 props[kURL] = base::Value::CreateStringValue(params.url.spec()); |
| 436 props[kIsTopLevel] = base::Value::CreateBooleanValue(params.is_top_level); | 438 props[kIsTopLevel] = base::Value::CreateBooleanValue(params.is_top_level); |
| 437 TriggerEvent(kEventLoadCommit, &props); | 439 TriggerEvent(kEventLoadCommit, &props); |
| 438 } | 440 } |
| 439 | 441 |
| 440 void BrowserPlugin::OnLoadRedirect(int instance_id, | 442 void BrowserPlugin::OnLoadRedirect(int instance_id, |
| (...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1118 void* notify_data) { | 1120 void* notify_data) { |
| 1119 } | 1121 } |
| 1120 | 1122 |
| 1121 void BrowserPlugin::didFailLoadingFrameRequest( | 1123 void BrowserPlugin::didFailLoadingFrameRequest( |
| 1122 const WebKit::WebURL& url, | 1124 const WebKit::WebURL& url, |
| 1123 void* notify_data, | 1125 void* notify_data, |
| 1124 const WebKit::WebURLError& error) { | 1126 const WebKit::WebURLError& error) { |
| 1125 } | 1127 } |
| 1126 | 1128 |
| 1127 } // namespace content | 1129 } // namespace content |
| OLD | NEW |