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

Side by Side Diff: chrome/renderer/render_view.cc

Issue 2864020: DevTools: Migrate to new WebView initialization (pass devtools client directly). (Closed)
Patch Set: deps roll Created 10 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 unified diff | Download patch
« no previous file with comments | « chrome/renderer/print_web_view_helper.cc ('k') | webkit/tools/test_shell/test_shell.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/renderer/render_view.h" 5 #include "chrome/renderer/render_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 shared_popup_counter_ = counter; 554 shared_popup_counter_ = counter;
555 shared_popup_counter_->data++; 555 shared_popup_counter_->data++;
556 decrement_shared_popup_at_destruction_ = true; 556 decrement_shared_popup_at_destruction_ = true;
557 } else { 557 } else {
558 shared_popup_counter_ = new SharedRenderViewCounter(0); 558 shared_popup_counter_ = new SharedRenderViewCounter(0);
559 decrement_shared_popup_at_destruction_ = false; 559 decrement_shared_popup_at_destruction_ = false;
560 } 560 }
561 561
562 devtools_agent_.reset(new DevToolsAgent(routing_id, this)); 562 devtools_agent_.reset(new DevToolsAgent(routing_id, this));
563 563
564 webwidget_ = WebView::create(this); 564 webwidget_ = WebView::create(this, devtools_agent_.get());
565 Singleton<ViewMap>::get()->insert(std::make_pair(webview(), this)); 565 Singleton<ViewMap>::get()->insert(std::make_pair(webview(), this));
566 webkit_preferences_.Apply(webview()); 566 webkit_preferences_.Apply(webview());
567 webview()->initializeMainFrame(this); 567 webview()->initializeMainFrame(this);
568 if (!frame_name.empty()) 568 if (!frame_name.empty())
569 webview()->mainFrame()->setName(frame_name); 569 webview()->mainFrame()->setName(frame_name);
570 webview()->setDevToolsAgent(
571 WebDevToolsAgent::create(webview(), devtools_agent_.get()));
572 570
573 OnSetRendererPrefs(renderer_prefs); 571 OnSetRendererPrefs(renderer_prefs);
574 572
575 routing_id_ = routing_id; 573 routing_id_ = routing_id;
576 render_thread_->AddRoute(routing_id_, this); 574 render_thread_->AddRoute(routing_id_, this);
577 // Take a reference on behalf of the RenderThread. This will be balanced 575 // Take a reference on behalf of the RenderThread. This will be balanced
578 // when we receive ViewMsg_Close. 576 // when we receive ViewMsg_Close.
579 AddRef(); 577 AddRef();
580 578
581 // If this is a popup, we must wait for the CreatingNew_ACK message before 579 // If this is a popup, we must wait for the CreatingNew_ACK message before
(...skipping 4611 matching lines...) Expand 10 before | Expand all | Expand 10 after
5193 webkit_glue::FormData form; 5191 webkit_glue::FormData form;
5194 const WebInputElement element = node.toConst<WebInputElement>(); 5192 const WebInputElement element = node.toConst<WebInputElement>();
5195 if (!form_manager_.FindFormWithFormControlElement( 5193 if (!form_manager_.FindFormWithFormControlElement(
5196 element, FormManager::REQUIRE_NONE, &form)) 5194 element, FormManager::REQUIRE_NONE, &form))
5197 return; 5195 return;
5198 5196
5199 autofill_action_ = action; 5197 autofill_action_ = action;
5200 Send(new ViewHostMsg_FillAutoFillFormData( 5198 Send(new ViewHostMsg_FillAutoFillFormData(
5201 routing_id_, autofill_query_id_, form, value, label)); 5199 routing_id_, autofill_query_id_, form, value, label));
5202 } 5200 }
OLDNEW
« no previous file with comments | « chrome/renderer/print_web_view_helper.cc ('k') | webkit/tools/test_shell/test_shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698