OLD | NEW |
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 Loading... |
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, devtools_agent_.get()); | 564 webwidget_ = WebView::create(this); |
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())); |
570 | 572 |
571 OnSetRendererPrefs(renderer_prefs); | 573 OnSetRendererPrefs(renderer_prefs); |
572 | 574 |
573 routing_id_ = routing_id; | 575 routing_id_ = routing_id; |
574 render_thread_->AddRoute(routing_id_, this); | 576 render_thread_->AddRoute(routing_id_, this); |
575 // Take a reference on behalf of the RenderThread. This will be balanced | 577 // Take a reference on behalf of the RenderThread. This will be balanced |
576 // when we receive ViewMsg_Close. | 578 // when we receive ViewMsg_Close. |
577 AddRef(); | 579 AddRef(); |
578 | 580 |
579 // If this is a popup, we must wait for the CreatingNew_ACK message before | 581 // 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 Loading... |
5191 webkit_glue::FormData form; | 5193 webkit_glue::FormData form; |
5192 const WebInputElement element = node.toConst<WebInputElement>(); | 5194 const WebInputElement element = node.toConst<WebInputElement>(); |
5193 if (!form_manager_.FindFormWithFormControlElement( | 5195 if (!form_manager_.FindFormWithFormControlElement( |
5194 element, FormManager::REQUIRE_NONE, &form)) | 5196 element, FormManager::REQUIRE_NONE, &form)) |
5195 return; | 5197 return; |
5196 | 5198 |
5197 autofill_action_ = action; | 5199 autofill_action_ = action; |
5198 Send(new ViewHostMsg_FillAutoFillFormData( | 5200 Send(new ViewHostMsg_FillAutoFillFormData( |
5199 routing_id_, autofill_query_id_, form, value, label)); | 5201 routing_id_, autofill_query_id_, form, value, label)); |
5200 } | 5202 } |
OLD | NEW |