Chromium Code Reviews

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

Issue 342092: Eliminate WebViewImpl's dependency on WebDevToolsAgentImpl.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
« no previous file with comments | « chrome/renderer/render_view.h ('k') | webkit/api/public/WebDevToolsAgent.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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 #if defined(ENABLE_PEPPER) 5 #if defined(ENABLE_PEPPER)
6 #define PEPPER_APIS_ENABLED 6 #define PEPPER_APIS_ENABLED
7 #endif 7 #endif
8 8
9 #include "chrome/renderer/render_view.h" 9 #include "chrome/renderer/render_view.h"
10 10
(...skipping 48 matching lines...)
59 #include "chrome/renderer/webworker_proxy.h" 59 #include "chrome/renderer/webworker_proxy.h"
60 #include "grit/generated_resources.h" 60 #include "grit/generated_resources.h"
61 #include "grit/renderer_resources.h" 61 #include "grit/renderer_resources.h"
62 #include "net/base/data_url.h" 62 #include "net/base/data_url.h"
63 #include "net/base/escape.h" 63 #include "net/base/escape.h"
64 #include "net/base/net_errors.h" 64 #include "net/base/net_errors.h"
65 #include "skia/ext/bitmap_platform_device.h" 65 #include "skia/ext/bitmap_platform_device.h"
66 #include "skia/ext/image_operations.h" 66 #include "skia/ext/image_operations.h"
67 #include "webkit/api/public/WebAccessibilityObject.h" 67 #include "webkit/api/public/WebAccessibilityObject.h"
68 #include "webkit/api/public/WebDataSource.h" 68 #include "webkit/api/public/WebDataSource.h"
69 #include "webkit/api/public/WebDevToolsAgentClient.h" 69 #include "webkit/api/public/WebDevToolsAgent.h"
70 #include "webkit/api/public/WebDragData.h" 70 #include "webkit/api/public/WebDragData.h"
71 #include "webkit/api/public/WebForm.h" 71 #include "webkit/api/public/WebForm.h"
72 #include "webkit/api/public/WebFrame.h" 72 #include "webkit/api/public/WebFrame.h"
73 #include "webkit/api/public/WebHistoryItem.h" 73 #include "webkit/api/public/WebHistoryItem.h"
74 #include "webkit/api/public/WebNode.h" 74 #include "webkit/api/public/WebNode.h"
75 #include "webkit/api/public/WebPoint.h" 75 #include "webkit/api/public/WebPoint.h"
76 #include "webkit/api/public/WebRect.h" 76 #include "webkit/api/public/WebRect.h"
77 #include "webkit/api/public/WebScriptSource.h" 77 #include "webkit/api/public/WebScriptSource.h"
78 #include "webkit/api/public/WebSearchableFormData.h" 78 #include "webkit/api/public/WebSearchableFormData.h"
79 #include "webkit/api/public/WebSecurityOrigin.h" 79 #include "webkit/api/public/WebSecurityOrigin.h"
(...skipping 34 matching lines...)
114 using webkit_glue::ImageResourceFetcher; 114 using webkit_glue::ImageResourceFetcher;
115 using webkit_glue::PasswordForm; 115 using webkit_glue::PasswordForm;
116 using webkit_glue::PasswordFormDomManager; 116 using webkit_glue::PasswordFormDomManager;
117 using WebKit::WebAccessibilityObject; 117 using WebKit::WebAccessibilityObject;
118 using WebKit::WebColor; 118 using WebKit::WebColor;
119 using WebKit::WebColorName; 119 using WebKit::WebColorName;
120 using WebKit::WebConsoleMessage; 120 using WebKit::WebConsoleMessage;
121 using WebKit::WebContextMenuData; 121 using WebKit::WebContextMenuData;
122 using WebKit::WebData; 122 using WebKit::WebData;
123 using WebKit::WebDataSource; 123 using WebKit::WebDataSource;
124 using WebKit::WebDevToolsAgentClient; 124 using WebKit::WebDevToolsAgent;
125 using WebKit::WebDragData; 125 using WebKit::WebDragData;
126 using WebKit::WebDragOperation; 126 using WebKit::WebDragOperation;
127 using WebKit::WebDragOperationsMask; 127 using WebKit::WebDragOperationsMask;
128 using WebKit::WebEditingAction; 128 using WebKit::WebEditingAction;
129 using WebKit::WebFindOptions; 129 using WebKit::WebFindOptions;
130 using WebKit::WebForm; 130 using WebKit::WebForm;
131 using WebKit::WebFrame; 131 using WebKit::WebFrame;
132 using WebKit::WebHistoryItem; 132 using WebKit::WebHistoryItem;
133 using WebKit::WebMediaPlayer; 133 using WebKit::WebMediaPlayer;
134 using WebKit::WebMediaPlayerAction; 134 using WebKit::WebMediaPlayerAction;
(...skipping 212 matching lines...)
347 shared_popup_counter_ = new SharedRenderViewCounter(0); 347 shared_popup_counter_ = new SharedRenderViewCounter(0);
348 decrement_shared_popup_at_destruction_ = false; 348 decrement_shared_popup_at_destruction_ = false;
349 } 349 }
350 350
351 devtools_agent_.reset(new DevToolsAgent(routing_id, this)); 351 devtools_agent_.reset(new DevToolsAgent(routing_id, this));
352 352
353 webwidget_ = WebView::create(this); 353 webwidget_ = WebView::create(this);
354 Singleton<ViewMap>::get()->insert(std::make_pair(webview(), this)); 354 Singleton<ViewMap>::get()->insert(std::make_pair(webview(), this));
355 webkit_preferences_.Apply(webview()); 355 webkit_preferences_.Apply(webview());
356 webview()->initializeMainFrame(this); 356 webview()->initializeMainFrame(this);
357 webview()->setDevToolsAgent(
358 WebDevToolsAgent::create(webview(), devtools_agent_.get()));
357 359
358 OnSetRendererPrefs(renderer_prefs); 360 OnSetRendererPrefs(renderer_prefs);
359 361
360 routing_id_ = routing_id; 362 routing_id_ = routing_id;
361 render_thread_->AddRoute(routing_id_, this); 363 render_thread_->AddRoute(routing_id_, this);
362 // Take a reference on behalf of the RenderThread. This will be balanced 364 // Take a reference on behalf of the RenderThread. This will be balanced
363 // when we receive ViewMsg_Close. 365 // when we receive ViewMsg_Close.
364 AddRef(); 366 AddRef();
365 367
366 // If this is a popup, we must wait for the CreatingNew_ACK message before 368 // If this is a popup, we must wait for the CreatingNew_ACK message before
(...skipping 1333 matching lines...)
1700 1702
1701 history_back_list_count_++; 1703 history_back_list_count_++;
1702 history_forward_list_count_ = 0; 1704 history_forward_list_count_ = 0;
1703 } 1705 }
1704 1706
1705 void RenderView::didUpdateInspectorSettings() { 1707 void RenderView::didUpdateInspectorSettings() {
1706 Send(new ViewHostMsg_UpdateInspectorSettings( 1708 Send(new ViewHostMsg_UpdateInspectorSettings(
1707 routing_id_, webview()->inspectorSettings().utf8())); 1709 routing_id_, webview()->inspectorSettings().utf8()));
1708 } 1710 }
1709 1711
1710 WebDevToolsAgentClient* RenderView::devToolsAgentClient() {
1711 return devtools_agent_.get();
1712 }
1713
1714 void RenderView::queryAutofillSuggestions(const WebNode& node, 1712 void RenderView::queryAutofillSuggestions(const WebNode& node,
1715 const WebString& name, 1713 const WebString& name,
1716 const WebString& value) { 1714 const WebString& value) {
1717 static int query_counter = 0; 1715 static int query_counter = 0;
1718 autofill_query_id_ = query_counter++; 1716 autofill_query_id_ = query_counter++;
1719 autofill_query_node_ = node; 1717 autofill_query_node_ = node;
1720 Send(new ViewHostMsg_QueryFormFieldAutofill( 1718 Send(new ViewHostMsg_QueryFormFieldAutofill(
1721 routing_id_, autofill_query_id_, name, value)); 1719 routing_id_, autofill_query_id_, name, value));
1722 } 1720 }
1723 1721
(...skipping 2049 matching lines...)
3773 new PluginMsg_SignalModalDialogEvent(host_window_)); 3771 new PluginMsg_SignalModalDialogEvent(host_window_));
3774 3772
3775 message->EnableMessagePumping(); // Runs a nested message loop. 3773 message->EnableMessagePumping(); // Runs a nested message loop.
3776 bool rv = Send(message); 3774 bool rv = Send(message);
3777 3775
3778 PluginChannelHost::Broadcast( 3776 PluginChannelHost::Broadcast(
3779 new PluginMsg_ResetModalDialogEvent(host_window_)); 3777 new PluginMsg_ResetModalDialogEvent(host_window_));
3780 3778
3781 return rv; 3779 return rv;
3782 } 3780 }
OLDNEW
« no previous file with comments | « chrome/renderer/render_view.h ('k') | webkit/api/public/WebDevToolsAgent.h » ('j') | no next file with comments »

Powered by Google App Engine