OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 #include "third_party/WebKit/public/platform/WebMediaPlayer.h" | 154 #include "third_party/WebKit/public/platform/WebMediaPlayer.h" |
155 #include "third_party/WebKit/public/platform/WebMediaPlayerSource.h" | 155 #include "third_party/WebKit/public/platform/WebMediaPlayerSource.h" |
156 #include "third_party/WebKit/public/platform/WebSecurityOrigin.h" | 156 #include "third_party/WebKit/public/platform/WebSecurityOrigin.h" |
157 #include "third_party/WebKit/public/platform/WebStorageQuotaCallbacks.h" | 157 #include "third_party/WebKit/public/platform/WebStorageQuotaCallbacks.h" |
158 #include "third_party/WebKit/public/platform/WebString.h" | 158 #include "third_party/WebKit/public/platform/WebString.h" |
159 #include "third_party/WebKit/public/platform/WebURL.h" | 159 #include "third_party/WebKit/public/platform/WebURL.h" |
160 #include "third_party/WebKit/public/platform/WebURLError.h" | 160 #include "third_party/WebKit/public/platform/WebURLError.h" |
161 #include "third_party/WebKit/public/platform/WebURLResponse.h" | 161 #include "third_party/WebKit/public/platform/WebURLResponse.h" |
162 #include "third_party/WebKit/public/platform/WebVector.h" | 162 #include "third_party/WebKit/public/platform/WebVector.h" |
163 #include "third_party/WebKit/public/web/WebColorSuggestion.h" | 163 #include "third_party/WebKit/public/web/WebColorSuggestion.h" |
| 164 #include "third_party/WebKit/public/web/WebConsoleMessage.h" |
164 #include "third_party/WebKit/public/web/WebDocument.h" | 165 #include "third_party/WebKit/public/web/WebDocument.h" |
165 #include "third_party/WebKit/public/web/WebFindOptions.h" | 166 #include "third_party/WebKit/public/web/WebFindOptions.h" |
166 #include "third_party/WebKit/public/web/WebFrameSerializer.h" | 167 #include "third_party/WebKit/public/web/WebFrameSerializer.h" |
167 #include "third_party/WebKit/public/web/WebFrameWidget.h" | 168 #include "third_party/WebKit/public/web/WebFrameWidget.h" |
168 #include "third_party/WebKit/public/web/WebKit.h" | 169 #include "third_party/WebKit/public/web/WebKit.h" |
169 #include "third_party/WebKit/public/web/WebLocalFrame.h" | 170 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
170 #include "third_party/WebKit/public/web/WebMediaStreamRegistry.h" | 171 #include "third_party/WebKit/public/web/WebMediaStreamRegistry.h" |
171 #include "third_party/WebKit/public/web/WebNavigationPolicy.h" | 172 #include "third_party/WebKit/public/web/WebNavigationPolicy.h" |
172 #include "third_party/WebKit/public/web/WebPlugin.h" | 173 #include "third_party/WebKit/public/web/WebPlugin.h" |
173 #include "third_party/WebKit/public/web/WebPluginContainer.h" | 174 #include "third_party/WebKit/public/web/WebPluginContainer.h" |
(...skipping 2178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2352 .ToV8()); | 2353 .ToV8()); |
2353 registry->AddBuiltinModule( | 2354 registry->AddBuiltinModule( |
2354 isolate, ServiceRegistryJsWrapper::kPerProcessModuleName, | 2355 isolate, ServiceRegistryJsWrapper::kPerProcessModuleName, |
2355 ServiceRegistryJsWrapper::Create( | 2356 ServiceRegistryJsWrapper::Create( |
2356 isolate, context, RenderThread::Get()->GetServiceRegistry()) | 2357 isolate, context, RenderThread::Get()->GetServiceRegistry()) |
2357 .ToV8()); | 2358 .ToV8()); |
2358 } | 2359 } |
2359 | 2360 |
2360 void RenderFrameImpl::AddMessageToConsole(ConsoleMessageLevel level, | 2361 void RenderFrameImpl::AddMessageToConsole(ConsoleMessageLevel level, |
2361 const std::string& message) { | 2362 const std::string& message) { |
2362 if (devtools_agent_) | 2363 blink::WebConsoleMessage::Level target_level = |
2363 devtools_agent_->AddMessageToConsole(level, message); | 2364 blink::WebConsoleMessage::LevelLog; |
| 2365 switch (level) { |
| 2366 case CONSOLE_MESSAGE_LEVEL_DEBUG: |
| 2367 target_level = blink::WebConsoleMessage::LevelDebug; |
| 2368 break; |
| 2369 case CONSOLE_MESSAGE_LEVEL_LOG: |
| 2370 target_level = blink::WebConsoleMessage::LevelLog; |
| 2371 break; |
| 2372 case CONSOLE_MESSAGE_LEVEL_WARNING: |
| 2373 target_level = blink::WebConsoleMessage::LevelWarning; |
| 2374 break; |
| 2375 case CONSOLE_MESSAGE_LEVEL_ERROR: |
| 2376 target_level = blink::WebConsoleMessage::LevelError; |
| 2377 break; |
| 2378 } |
| 2379 |
| 2380 blink::WebConsoleMessage wcm(target_level, WebString::fromUTF8(message)); |
| 2381 frame_->addMessageToConsole(wcm); |
2364 } | 2382 } |
2365 | 2383 |
2366 bool RenderFrameImpl::IsUsingLoFi() const { | 2384 bool RenderFrameImpl::IsUsingLoFi() const { |
2367 return is_using_lofi_; | 2385 return is_using_lofi_; |
2368 } | 2386 } |
2369 | 2387 |
2370 bool RenderFrameImpl::IsPasting() const { | 2388 bool RenderFrameImpl::IsPasting() const { |
2371 return is_pasting_; | 2389 return is_pasting_; |
2372 } | 2390 } |
2373 | 2391 |
(...skipping 3657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6031 int match_count, | 6049 int match_count, |
6032 int ordinal, | 6050 int ordinal, |
6033 const WebRect& selection_rect, | 6051 const WebRect& selection_rect, |
6034 bool final_status_update) { | 6052 bool final_status_update) { |
6035 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, | 6053 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, |
6036 selection_rect, ordinal, | 6054 selection_rect, ordinal, |
6037 final_status_update)); | 6055 final_status_update)); |
6038 } | 6056 } |
6039 | 6057 |
6040 } // namespace content | 6058 } // namespace content |
OLD | NEW |