| 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 2627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2638 registry->AddBuiltinModule( | 2638 registry->AddBuiltinModule( |
| 2639 isolate, InterfaceProviderJsWrapper::kPerProcessModuleName, | 2639 isolate, InterfaceProviderJsWrapper::kPerProcessModuleName, |
| 2640 InterfaceProviderJsWrapper::Create( | 2640 InterfaceProviderJsWrapper::Create( |
| 2641 isolate, context, RenderThread::Get()->GetRemoteInterfaces()) | 2641 isolate, context, RenderThread::Get()->GetRemoteInterfaces()) |
| 2642 .ToV8()); | 2642 .ToV8()); |
| 2643 } | 2643 } |
| 2644 | 2644 |
| 2645 void RenderFrameImpl::AddMessageToConsole(ConsoleMessageLevel level, | 2645 void RenderFrameImpl::AddMessageToConsole(ConsoleMessageLevel level, |
| 2646 const std::string& message) { | 2646 const std::string& message) { |
| 2647 blink::WebConsoleMessage::Level target_level = | 2647 blink::WebConsoleMessage::Level target_level = |
| 2648 blink::WebConsoleMessage::LevelLog; | 2648 blink::WebConsoleMessage::LevelInfo; |
| 2649 switch (level) { | 2649 switch (level) { |
| 2650 case CONSOLE_MESSAGE_LEVEL_DEBUG: | 2650 case CONSOLE_MESSAGE_LEVEL_VERBOSE: |
| 2651 target_level = blink::WebConsoleMessage::LevelDebug; | 2651 target_level = blink::WebConsoleMessage::LevelVerbose; |
| 2652 break; | 2652 break; |
| 2653 case CONSOLE_MESSAGE_LEVEL_LOG: | 2653 case CONSOLE_MESSAGE_LEVEL_INFO: |
| 2654 target_level = blink::WebConsoleMessage::LevelLog; | 2654 target_level = blink::WebConsoleMessage::LevelInfo; |
| 2655 break; | 2655 break; |
| 2656 case CONSOLE_MESSAGE_LEVEL_WARNING: | 2656 case CONSOLE_MESSAGE_LEVEL_WARNING: |
| 2657 target_level = blink::WebConsoleMessage::LevelWarning; | 2657 target_level = blink::WebConsoleMessage::LevelWarning; |
| 2658 break; | 2658 break; |
| 2659 case CONSOLE_MESSAGE_LEVEL_ERROR: | 2659 case CONSOLE_MESSAGE_LEVEL_ERROR: |
| 2660 target_level = blink::WebConsoleMessage::LevelError; | 2660 target_level = blink::WebConsoleMessage::LevelError; |
| 2661 break; | 2661 break; |
| 2662 } | 2662 } |
| 2663 | 2663 |
| 2664 blink::WebConsoleMessage wcm(target_level, WebString::fromUTF8(message)); | 2664 blink::WebConsoleMessage wcm(target_level, WebString::fromUTF8(message)); |
| (...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3230 source); | 3230 source); |
| 3231 } | 3231 } |
| 3232 | 3232 |
| 3233 void RenderFrameImpl::didAddMessageToConsole( | 3233 void RenderFrameImpl::didAddMessageToConsole( |
| 3234 const blink::WebConsoleMessage& message, | 3234 const blink::WebConsoleMessage& message, |
| 3235 const blink::WebString& source_name, | 3235 const blink::WebString& source_name, |
| 3236 unsigned source_line, | 3236 unsigned source_line, |
| 3237 const blink::WebString& stack_trace) { | 3237 const blink::WebString& stack_trace) { |
| 3238 logging::LogSeverity log_severity = logging::LOG_VERBOSE; | 3238 logging::LogSeverity log_severity = logging::LOG_VERBOSE; |
| 3239 switch (message.level) { | 3239 switch (message.level) { |
| 3240 case blink::WebConsoleMessage::LevelDebug: | 3240 case blink::WebConsoleMessage::LevelVerbose: |
| 3241 log_severity = logging::LOG_VERBOSE; | 3241 log_severity = logging::LOG_VERBOSE; |
| 3242 break; | 3242 break; |
| 3243 case blink::WebConsoleMessage::LevelLog: | |
| 3244 case blink::WebConsoleMessage::LevelInfo: | 3243 case blink::WebConsoleMessage::LevelInfo: |
| 3245 log_severity = logging::LOG_INFO; | 3244 log_severity = logging::LOG_INFO; |
| 3246 break; | 3245 break; |
| 3247 case blink::WebConsoleMessage::LevelWarning: | 3246 case blink::WebConsoleMessage::LevelWarning: |
| 3248 log_severity = logging::LOG_WARNING; | 3247 log_severity = logging::LOG_WARNING; |
| 3249 break; | 3248 break; |
| 3250 case blink::WebConsoleMessage::LevelError: | 3249 case blink::WebConsoleMessage::LevelError: |
| 3251 log_severity = logging::LOG_ERROR; | 3250 log_severity = logging::LOG_ERROR; |
| 3252 break; | 3251 break; |
| 3253 default: | 3252 default: |
| (...skipping 3612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6866 // event target. Potentially a Pepper plugin will receive the event. | 6865 // event target. Potentially a Pepper plugin will receive the event. |
| 6867 // In order to tell whether a plugin gets the last mouse event and which it | 6866 // In order to tell whether a plugin gets the last mouse event and which it |
| 6868 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6867 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
| 6869 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6868 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
| 6870 // |pepper_last_mouse_event_target_|. | 6869 // |pepper_last_mouse_event_target_|. |
| 6871 pepper_last_mouse_event_target_ = nullptr; | 6870 pepper_last_mouse_event_target_ = nullptr; |
| 6872 #endif | 6871 #endif |
| 6873 } | 6872 } |
| 6874 | 6873 |
| 6875 } // namespace content | 6874 } // namespace content |
| OLD | NEW |