| 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 #ifndef CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 14 #include "chrome/browser/ssl/security_level_policy.h" |
| 14 #include "chrome/browser/ui/omnibox/omnibox_view.h" | 15 #include "chrome/browser/ui/omnibox/omnibox_view.h" |
| 15 #include "chrome/browser/ui/toolbar/toolbar_model.h" | 16 #include "chrome/browser/ui/toolbar/toolbar_model.h" |
| 16 #include "ui/base/window_open_disposition.h" | 17 #include "ui/base/window_open_disposition.h" |
| 17 #include "ui/gfx/range/range.h" | 18 #include "ui/gfx/range/range.h" |
| 18 #include "ui/views/controls/textfield/textfield.h" | 19 #include "ui/views/controls/textfield/textfield.h" |
| 19 #include "ui/views/controls/textfield/textfield_controller.h" | 20 #include "ui/views/controls/textfield/textfield_controller.h" |
| 20 | 21 |
| 21 #if defined(OS_CHROMEOS) | 22 #if defined(OS_CHROMEOS) |
| 22 #include "ui/base/ime/chromeos/input_method_manager.h" | 23 #include "ui/base/ime/chromeos/input_method_manager.h" |
| 23 #endif | 24 #endif |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 std::set<ui::OSExchangeData::CustomFormat>* custom_formats) override; | 187 std::set<ui::OSExchangeData::CustomFormat>* custom_formats) override; |
| 187 int OnDrop(const ui::OSExchangeData& data) override; | 188 int OnDrop(const ui::OSExchangeData& data) override; |
| 188 void UpdateContextMenu(ui::SimpleMenuModel* menu_contents) override; | 189 void UpdateContextMenu(ui::SimpleMenuModel* menu_contents) override; |
| 189 | 190 |
| 190 // When true, the location bar view is read only and also is has a slightly | 191 // When true, the location bar view is read only and also is has a slightly |
| 191 // different presentation (smaller font size). This is used for popups. | 192 // different presentation (smaller font size). This is used for popups. |
| 192 bool popup_window_mode_; | 193 bool popup_window_mode_; |
| 193 | 194 |
| 194 scoped_ptr<OmniboxPopupView> popup_view_; | 195 scoped_ptr<OmniboxPopupView> popup_view_; |
| 195 | 196 |
| 196 ToolbarModel::SecurityLevel security_level_; | 197 SecurityLevelPolicy::SecurityLevel security_level_; |
| 197 | 198 |
| 198 // Selection persisted across temporary text changes, like popup suggestions. | 199 // Selection persisted across temporary text changes, like popup suggestions. |
| 199 gfx::Range saved_temporary_selection_; | 200 gfx::Range saved_temporary_selection_; |
| 200 | 201 |
| 201 // Holds the user's selection across focus changes. There is only a saved | 202 // Holds the user's selection across focus changes. There is only a saved |
| 202 // selection if this range IsValid(). | 203 // selection if this range IsValid(). |
| 203 gfx::Range saved_selection_for_focus_change_; | 204 gfx::Range saved_selection_for_focus_change_; |
| 204 | 205 |
| 205 // Tracking state before and after a possible change. | 206 // Tracking state before and after a possible change. |
| 206 base::string16 text_before_change_; | 207 base::string16 text_before_change_; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 233 // painted. Used to measure omnibox responsiveness with a histogram. | 234 // painted. Used to measure omnibox responsiveness with a histogram. |
| 234 base::TimeTicks insert_char_time_; | 235 base::TimeTicks insert_char_time_; |
| 235 | 236 |
| 236 // Used to bind callback functions to this object. | 237 // Used to bind callback functions to this object. |
| 237 base::WeakPtrFactory<OmniboxViewViews> weak_ptr_factory_; | 238 base::WeakPtrFactory<OmniboxViewViews> weak_ptr_factory_; |
| 238 | 239 |
| 239 DISALLOW_COPY_AND_ASSIGN(OmniboxViewViews); | 240 DISALLOW_COPY_AND_ASSIGN(OmniboxViewViews); |
| 240 }; | 241 }; |
| 241 | 242 |
| 242 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_ | 243 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_VIEW_VIEWS_H_ |
| OLD | NEW |