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 "chrome/browser/ui/views/omnibox/omnibox_view_views.h" | 5 #include "chrome/browser/ui/views/omnibox/omnibox_view_views.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 #include "ui/views/views_delegate.h" | 50 #include "ui/views/views_delegate.h" |
51 #include "ui/views/widget/widget.h" | 51 #include "ui/views/widget/widget.h" |
52 #include "url/gurl.h" | 52 #include "url/gurl.h" |
53 | 53 |
54 #if defined(OS_WIN) | 54 #if defined(OS_WIN) |
55 #include "chrome/browser/browser_process.h" | 55 #include "chrome/browser/browser_process.h" |
56 #endif | 56 #endif |
57 | 57 |
58 #if defined(USE_AURA) | 58 #if defined(USE_AURA) |
59 #include "ui/aura/client/focus_client.h" | 59 #include "ui/aura/client/focus_client.h" |
60 #include "ui/aura/root_window.h" | 60 #include "ui/aura/window_event_dispatcher.h" |
61 #include "ui/compositor/layer.h" | 61 #include "ui/compositor/layer.h" |
62 #endif | 62 #endif |
63 | 63 |
64 namespace { | 64 namespace { |
65 | 65 |
66 // Stores omnibox state for each tab. | 66 // Stores omnibox state for each tab. |
67 struct OmniboxState : public base::SupportsUserData::Data { | 67 struct OmniboxState : public base::SupportsUserData::Data { |
68 static const char kKey[]; | 68 static const char kKey[]; |
69 | 69 |
70 OmniboxState(const OmniboxEditModel::State& model_state, | 70 OmniboxState(const OmniboxEditModel::State& model_state, |
(...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1019 const base::string16 text(GetClipboardText()); | 1019 const base::string16 text(GetClipboardText()); |
1020 if (!text.empty()) { | 1020 if (!text.empty()) { |
1021 // Record this paste, so we can do different behavior. | 1021 // Record this paste, so we can do different behavior. |
1022 model()->OnPaste(); | 1022 model()->OnPaste(); |
1023 // Force a Paste operation to trigger the text_changed code in | 1023 // Force a Paste operation to trigger the text_changed code in |
1024 // OnAfterPossibleChange(), even if identical contents are pasted. | 1024 // OnAfterPossibleChange(), even if identical contents are pasted. |
1025 text_before_change_.clear(); | 1025 text_before_change_.clear(); |
1026 InsertOrReplaceText(text); | 1026 InsertOrReplaceText(text); |
1027 } | 1027 } |
1028 } | 1028 } |
OLD | NEW |