Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2856)

Unified Diff: content/renderer/browser_plugin/browser_plugin.cc

Issue 17165004: <webview>: Partially migrate loadcommit event from content to chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge with ToT Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 011b2ece8b0187b2570952fd2c2275fb09a6de1d..25cdaa0068594b4f5367aaa7cb6bcd6357ea6242 100644
--- a/content/renderer/browser_plugin/browser_plugin.cc
+++ b/content/renderer/browser_plugin/browser_plugin.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -420,6 +420,11 @@ void BrowserPlugin::Attach(int guest_instance_id) {
guest_instance_id_ = guest_instance_id;
browser_plugin_manager()->AddBrowserPlugin(guest_instance_id, this);
+ std::map<std::string, base::Value*> props;
+ props[browser_plugin::kWindowID] =
+ new base::FundamentalValue(guest_instance_id);
+ TriggerEvent(browser_plugin::kEventInternalAttached, &props);
+
BrowserPluginHostMsg_Attach_Params attach_params;
attach_params.browser_plugin_instance_id = instance_id_;
attach_params.focused = ShouldGuestBeFocused();
@@ -583,12 +588,6 @@ void BrowserPlugin::OnLoadCommit(
current_nav_entry_index_ = params.current_entry_index;
nav_entry_count_ = params.entry_count;
-
- std::map<std::string, base::Value*> props;
- props[browser_plugin::kURL] = new base::StringValue(params.url.spec());
- props[browser_plugin::kIsTopLevel] =
- new base::FundamentalValue(params.is_top_level);
- TriggerEvent(browser_plugin::kEventLoadCommit, &props);
}
void BrowserPlugin::OnLoadHandlerCalled(int guest_instance_id) {
« no previous file with comments | « content/renderer/browser_plugin/browser_plugin.h ('k') | content/renderer/browser_plugin/browser_plugin_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698