Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/renderer/render_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 183 #include "third_party/WebKit/public/platform/WebPoint.h" | 183 #include "third_party/WebKit/public/platform/WebPoint.h" |
| 184 #include "third_party/WebKit/public/platform/WebRect.h" | 184 #include "third_party/WebKit/public/platform/WebRect.h" |
| 185 #include "third_party/WebKit/public/platform/WebSize.h" | 185 #include "third_party/WebKit/public/platform/WebSize.h" |
| 186 #include "third_party/WebKit/public/platform/WebSocketStreamHandle.h" | 186 #include "third_party/WebKit/public/platform/WebSocketStreamHandle.h" |
| 187 #include "third_party/WebKit/public/platform/WebString.h" | 187 #include "third_party/WebKit/public/platform/WebString.h" |
| 188 #include "third_party/WebKit/public/platform/WebURL.h" | 188 #include "third_party/WebKit/public/platform/WebURL.h" |
| 189 #include "third_party/WebKit/public/platform/WebURLError.h" | 189 #include "third_party/WebKit/public/platform/WebURLError.h" |
| 190 #include "third_party/WebKit/public/platform/WebURLRequest.h" | 190 #include "third_party/WebKit/public/platform/WebURLRequest.h" |
| 191 #include "third_party/WebKit/public/platform/WebURLResponse.h" | 191 #include "third_party/WebKit/public/platform/WebURLResponse.h" |
| 192 #include "third_party/WebKit/public/platform/WebVector.h" | 192 #include "third_party/WebKit/public/platform/WebVector.h" |
| 193 #include "third_party/WebKit/public/web/WebTestingSupport.h" | |
| 193 #include "third_party/skia/include/core/SkBitmap.h" | 194 #include "third_party/skia/include/core/SkBitmap.h" |
| 194 #include "third_party/skia/include/core/SkPicture.h" | 195 #include "third_party/skia/include/core/SkPicture.h" |
| 195 #include "ui/base/ui_base_switches_util.h" | 196 #include "ui/base/ui_base_switches_util.h" |
| 196 #include "ui/gfx/native_widget_types.h" | 197 #include "ui/gfx/native_widget_types.h" |
| 197 #include "ui/gfx/point.h" | 198 #include "ui/gfx/point.h" |
| 198 #include "ui/gfx/rect.h" | 199 #include "ui/gfx/rect.h" |
| 199 #include "ui/gfx/rect_conversions.h" | 200 #include "ui/gfx/rect_conversions.h" |
| 200 #include "ui/gfx/size_conversions.h" | 201 #include "ui/gfx/size_conversions.h" |
| 201 #include "ui/shell_dialogs/selected_file_info.h" | 202 #include "ui/shell_dialogs/selected_file_info.h" |
| 202 #include "v8/include/v8.h" | 203 #include "v8/include/v8.h" |
| (...skipping 3623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3826 } | 3827 } |
| 3827 | 3828 |
| 3828 if (enabled_bindings_ & BINDINGS_POLICY_STATS_COLLECTION) { | 3829 if (enabled_bindings_ & BINDINGS_POLICY_STATS_COLLECTION) { |
| 3829 if (!stats_collection_controller_.get()) | 3830 if (!stats_collection_controller_.get()) |
| 3830 stats_collection_controller_.reset(new StatsCollectionController()); | 3831 stats_collection_controller_.reset(new StatsCollectionController()); |
| 3831 stats_collection_controller_->set_message_sender( | 3832 stats_collection_controller_->set_message_sender( |
| 3832 static_cast<RenderView*>(this)); | 3833 static_cast<RenderView*>(this)); |
| 3833 stats_collection_controller_->BindToJavascript(frame, | 3834 stats_collection_controller_->BindToJavascript(frame, |
| 3834 "statsCollectionController"); | 3835 "statsCollectionController"); |
| 3835 } | 3836 } |
| 3837 | |
| 3838 if (CommandLine::ForCurrentProcess()->HasSwitch( | |
| 3839 switches::kExposeInternalsForTesting)) | |
|
jam
2013/06/26 16:46:16
nit: indent 4 spaces here. also i think in general
Rick Byers
2013/06/26 17:32:05
It is 4 spaces already, right?
jam
2013/06/26 17:38:11
i mean more indentation, so that it's four spaces
| |
| 3840 WebKit::WebTestingSupport::injectInternalsObject(frame); | |
| 3836 } | 3841 } |
| 3837 | 3842 |
| 3838 void RenderViewImpl::didCreateDocumentElement(WebFrame* frame) { | 3843 void RenderViewImpl::didCreateDocumentElement(WebFrame* frame) { |
| 3839 // Notify the browser about non-blank documents loading in the top frame. | 3844 // Notify the browser about non-blank documents loading in the top frame. |
| 3840 GURL url = frame->document().url(); | 3845 GURL url = frame->document().url(); |
| 3841 if (url.is_valid() && url.spec() != kAboutBlankURL) { | 3846 if (url.is_valid() && url.spec() != kAboutBlankURL) { |
| 3842 if (frame == webview()->mainFrame()) | 3847 if (frame == webview()->mainFrame()) |
| 3843 Send(new ViewHostMsg_DocumentAvailableInMainFrame(routing_id_)); | 3848 Send(new ViewHostMsg_DocumentAvailableInMainFrame(routing_id_)); |
| 3844 } | 3849 } |
| 3845 | 3850 |
| (...skipping 2920 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6766 WebURL url = icon_urls[i].iconURL(); | 6771 WebURL url = icon_urls[i].iconURL(); |
| 6767 if (!url.isEmpty()) | 6772 if (!url.isEmpty()) |
| 6768 urls.push_back(FaviconURL(url, | 6773 urls.push_back(FaviconURL(url, |
| 6769 ToFaviconType(icon_urls[i].iconType()))); | 6774 ToFaviconType(icon_urls[i].iconType()))); |
| 6770 } | 6775 } |
| 6771 SendUpdateFaviconURL(urls); | 6776 SendUpdateFaviconURL(urls); |
| 6772 } | 6777 } |
| 6773 | 6778 |
| 6774 | 6779 |
| 6775 } // namespace content | 6780 } // namespace content |
| OLD | NEW |