| 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/browser/frame_host/render_frame_host_impl.h" | 5 #include "content/browser/frame_host/render_frame_host_impl.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 1566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1577 NOTREACHED() << "Received script response for unknown request"; | 1577 NOTREACHED() << "Received script response for unknown request"; |
| 1578 } | 1578 } |
| 1579 } | 1579 } |
| 1580 | 1580 |
| 1581 void RenderFrameHostImpl::OnRunJavaScriptMessage( | 1581 void RenderFrameHostImpl::OnRunJavaScriptMessage( |
| 1582 const base::string16& message, | 1582 const base::string16& message, |
| 1583 const base::string16& default_prompt, | 1583 const base::string16& default_prompt, |
| 1584 const GURL& frame_url, | 1584 const GURL& frame_url, |
| 1585 JavaScriptMessageType type, | 1585 JavaScriptMessageType type, |
| 1586 IPC::Message* reply_msg) { | 1586 IPC::Message* reply_msg) { |
| 1587 if (!is_active()) { |
| 1588 JavaScriptDialogClosed(reply_msg, true, base::string16(), true); |
| 1589 return; |
| 1590 } |
| 1591 |
| 1587 int32_t message_length = static_cast<int32_t>(message.length()); | 1592 int32_t message_length = static_cast<int32_t>(message.length()); |
| 1588 if (GetParent()) { | 1593 if (GetParent()) { |
| 1589 UMA_HISTOGRAM_COUNTS("JSDialogs.CharacterCount.Subframe", message_length); | 1594 UMA_HISTOGRAM_COUNTS("JSDialogs.CharacterCount.Subframe", message_length); |
| 1590 } else { | 1595 } else { |
| 1591 UMA_HISTOGRAM_COUNTS("JSDialogs.CharacterCount.MainFrame", message_length); | 1596 UMA_HISTOGRAM_COUNTS("JSDialogs.CharacterCount.MainFrame", message_length); |
| 1592 } | 1597 } |
| 1593 | 1598 |
| 1594 // While a JS message dialog is showing, tabs in the same process shouldn't | 1599 // While a JS message dialog is showing, tabs in the same process shouldn't |
| 1595 // process input events. | 1600 // process input events. |
| 1596 GetProcess()->SetIgnoreInputEvents(true); | 1601 GetProcess()->SetIgnoreInputEvents(true); |
| (...skipping 1485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3082 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( | 3087 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( |
| 3083 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); | 3088 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); |
| 3084 return web_bluetooth_service_.get(); | 3089 return web_bluetooth_service_.get(); |
| 3085 } | 3090 } |
| 3086 | 3091 |
| 3087 void RenderFrameHostImpl::DeleteWebBluetoothService() { | 3092 void RenderFrameHostImpl::DeleteWebBluetoothService() { |
| 3088 web_bluetooth_service_.reset(); | 3093 web_bluetooth_service_.reset(); |
| 3089 } | 3094 } |
| 3090 | 3095 |
| 3091 } // namespace content | 3096 } // namespace content |
| OLD | NEW |