Chromium Code Reviews| Index: content/renderer/browser_plugin/browser_plugin.cc |
| diff --git a/content/renderer/browser_plugin/browser_plugin.cc b/content/renderer/browser_plugin/browser_plugin.cc |
| index e47fe771e47b77ae448495f0dc5a472c352d10f6..ea37adceb6259e2ccb4281477c98122d130c4f0f 100644 |
| --- a/content/renderer/browser_plugin/browser_plugin.cc |
| +++ b/content/renderer/browser_plugin/browser_plugin.cc |
| @@ -6,6 +6,7 @@ |
| #include "base/json/json_string_value_serializer.h" |
| #include "base/message_loop.h" |
| +#include "base/string_number_conversions.h" |
| #include "base/string_util.h" |
| #include "base/utf_string_conversions.h" |
| #include "content/common/browser_plugin_messages.h" |
| @@ -66,8 +67,8 @@ const char kOldWidth[] = "oldWidth"; |
| const char kPartition[] = "partition"; |
| const char kPersistPrefix[] = "persist:"; |
| const char kProcessId[] = "processId"; |
| -const char kSrc[] = "src"; |
| const char kReason[] = "reason"; |
| +const char kSrc[] = "src"; |
| const char kURL[] = "url"; |
| // Error messages. |
| @@ -259,6 +260,16 @@ bool BrowserPlugin::DamageBufferMatches( |
| } |
| #endif |
| +void BrowserPlugin::UpdateDOMAttribute( |
| + const std::string& attribute_name, |
|
lazyboy
2012/11/30 22:11:36
nit fits in previous line.
Fady Samuel
2012/11/30 22:57:12
Done.
|
| + const std::string& attribute_value) { |
| + if (container()) { |
| + container()->element().setAttribute( |
| + WebKit::WebString::fromUTF8(attribute_name), |
| + WebKit::WebString::fromUTF8(attribute_value)); |
| + } |
| +} |
| + |
| void BrowserPlugin::SetMaxHeightAttribute(int max_height) { |
| if (max_height_ == max_height) |
| return; |
| @@ -613,7 +624,10 @@ void BrowserPlugin::LoadCommit( |
| // If the guest has just committed a new navigation then it is no longer |
| // crashed. |
| guest_crashed_ = false; |
| - src_ = params.url.spec(); |
| + if (params.is_top_level) { |
|
Fady Samuel
2012/11/30 21:56:51
This is being addressed in a separate patch. Howev
lazyboy
2012/11/30 22:11:36
Yes
Fady Samuel
2012/11/30 22:57:12
That change is on the CQ. I will land this change
|
| + src_ = params.url.spec(); |
| + UpdateDOMAttribute(kSrc, src_.c_str()); |
| + } |
| process_id_ = params.process_id; |
| current_nav_entry_index_ = params.current_entry_index; |
| nav_entry_count_ = params.entry_count; |