| 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 "components/app_modal/javascript_app_modal_dialog.h" | 5 #include "components/app_modal/javascript_app_modal_dialog.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" |
| 7 #include "components/app_modal/javascript_dialog_manager.h" | 8 #include "components/app_modal/javascript_dialog_manager.h" |
| 8 #include "components/app_modal/javascript_native_dialog_factory.h" | 9 #include "components/app_modal/javascript_native_dialog_factory.h" |
| 9 #include "content/public/browser/web_contents.h" | 10 #include "content/public/browser/web_contents.h" |
| 10 #include "ui/gfx/text_elider.h" | 11 #include "ui/gfx/text_elider.h" |
| 11 #include "url/origin.h" | 12 #include "url/origin.h" |
| 12 | 13 |
| 13 namespace app_modal { | 14 namespace app_modal { |
| 14 namespace { | 15 namespace { |
| 15 | 16 |
| 16 // Control maximum sizes of various texts passed to us from javascript. | 17 // Control maximum sizes of various texts passed to us from javascript. |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 | 164 |
| 164 // static | 165 // static |
| 165 std::string JavaScriptAppModalDialog::GetSerializedOriginForWebContents( | 166 std::string JavaScriptAppModalDialog::GetSerializedOriginForWebContents( |
| 166 content::WebContents* contents) { | 167 content::WebContents* contents) { |
| 167 if (!contents) | 168 if (!contents) |
| 168 return url::Origin().Serialize(); | 169 return url::Origin().Serialize(); |
| 169 return url::Origin(contents->GetLastCommittedURL()).Serialize(); | 170 return url::Origin(contents->GetLastCommittedURL()).Serialize(); |
| 170 } | 171 } |
| 171 | 172 |
| 172 } // namespace app_modal | 173 } // namespace app_modal |
| OLD | NEW |