| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/autocomplete/autocomplete_edit_view_gtk.h" | 5 #include "chrome/browser/autocomplete/autocomplete_edit_view_gtk.h" |
| 6 | 6 |
| 7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
| 8 #include <gdk/gdkkeysyms.h> | 8 #include <gdk/gdkkeysyms.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| 11 | 11 |
| 12 #include "app/clipboard/clipboard.h" | |
| 13 #include "app/clipboard/scoped_clipboard_writer.h" | |
| 14 #include "app/l10n_util.h" | 12 #include "app/l10n_util.h" |
| 15 #include "base/gtk_util.h" | 13 #include "base/gtk_util.h" |
| 16 #include "base/logging.h" | 14 #include "base/logging.h" |
| 17 #include "base/utf_string_conversions.h" | 15 #include "base/utf_string_conversions.h" |
| 18 #include "chrome/app/chrome_dll_resource.h" | 16 #include "chrome/app/chrome_dll_resource.h" |
| 19 #include "chrome/browser/autocomplete/autocomplete_edit.h" | 17 #include "chrome/browser/autocomplete/autocomplete_edit.h" |
| 20 #include "chrome/browser/autocomplete/autocomplete_popup_model.h" | 18 #include "chrome/browser/autocomplete/autocomplete_popup_model.h" |
| 21 #include "chrome/browser/bookmarks/bookmark_drag_data.h" | 19 #include "chrome/browser/bookmarks/bookmark_drag_data.h" |
| 22 #include "chrome/browser/browser_process.h" | 20 #include "chrome/browser/browser_process.h" |
| 23 #include "chrome/browser/command_updater.h" | 21 #include "chrome/browser/command_updater.h" |
| (...skipping 1538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1562 CharRange selection = GetSelection(); | 1560 CharRange selection = GetSelection(); |
| 1563 GURL url; | 1561 GURL url; |
| 1564 bool write_url; | 1562 bool write_url; |
| 1565 model_->AdjustTextForCopy(selection.selection_min(), IsSelectAll(), &text, | 1563 model_->AdjustTextForCopy(selection.selection_min(), IsSelectAll(), &text, |
| 1566 &url, &write_url); | 1564 &url, &write_url); |
| 1567 if (write_url) { | 1565 if (write_url) { |
| 1568 selected_text_ = WideToUTF8(text); | 1566 selected_text_ = WideToUTF8(text); |
| 1569 OwnPrimarySelection(selected_text_); | 1567 OwnPrimarySelection(selected_text_); |
| 1570 } | 1568 } |
| 1571 } | 1569 } |
| OLD | NEW |