| 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/browser/web_contents/web_contents_view_aura.h" | 5 #include "content/browser/web_contents/web_contents_view_aura.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 void PrepareDropData(DropData* drop_data, const ui::OSExchangeData& data) { | 320 void PrepareDropData(DropData* drop_data, const ui::OSExchangeData& data) { |
| 321 drop_data->did_originate_from_renderer = data.DidOriginateFromRenderer(); | 321 drop_data->did_originate_from_renderer = data.DidOriginateFromRenderer(); |
| 322 | 322 |
| 323 base::string16 plain_text; | 323 base::string16 plain_text; |
| 324 data.GetString(&plain_text); | 324 data.GetString(&plain_text); |
| 325 if (!plain_text.empty()) | 325 if (!plain_text.empty()) |
| 326 drop_data->text = base::NullableString16(plain_text, false); | 326 drop_data->text = base::NullableString16(plain_text, false); |
| 327 | 327 |
| 328 GURL url; | 328 GURL url; |
| 329 base::string16 url_title; | 329 base::string16 url_title; |
| 330 data.GetURLAndTitle( | 330 data.GetURLAndTitle(ui::OSExchangeData::DO_NOT_CONVERT_FILENAMES, |
| 331 ui::OSExchangeData::DO_NOT_CONVERT_FILENAMES, &url, &url_title); | 331 ui::OSExchangeData::PARSE_TEXT_AS_URL, &url, &url_title); |
| 332 if (url.is_valid()) { | 332 if (url.is_valid()) { |
| 333 drop_data->url = url; | 333 drop_data->url = url; |
| 334 drop_data->url_title = url_title; | 334 drop_data->url_title = url_title; |
| 335 } | 335 } |
| 336 | 336 |
| 337 base::string16 html; | 337 base::string16 html; |
| 338 GURL html_base_url; | 338 GURL html_base_url; |
| 339 data.GetHtml(&html, &html_base_url); | 339 data.GetHtml(&html, &html_base_url); |
| 340 if (!html.empty()) | 340 if (!html.empty()) |
| 341 drop_data->html = base::NullableString16(html, false); | 341 drop_data->html = base::NullableString16(html, false); |
| (...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1128 void WebContentsViewAura::OnWindowVisibilityChanged(aura::Window* window, | 1128 void WebContentsViewAura::OnWindowVisibilityChanged(aura::Window* window, |
| 1129 bool visible) { | 1129 bool visible) { |
| 1130 // Ignore any visibility changes in the hierarchy below. | 1130 // Ignore any visibility changes in the hierarchy below. |
| 1131 if (window != window_.get() && window_->Contains(window)) | 1131 if (window != window_.get() && window_->Contains(window)) |
| 1132 return; | 1132 return; |
| 1133 | 1133 |
| 1134 web_contents_->UpdateWebContentsVisibility(visible); | 1134 web_contents_->UpdateWebContentsVisibility(visible); |
| 1135 } | 1135 } |
| 1136 | 1136 |
| 1137 } // namespace content | 1137 } // namespace content |
| OLD | NEW |