Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(402)

Side by Side Diff: chrome/browser/ui/views/omnibox/omnibox_view_win.cc

Issue 10534153: Use OmniboxViewViews on Win with --enable-views-textfield. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ignore Patch Set 3; use static bool in UseOmniboxViews(). Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_win.h" 5 #include "chrome/browser/ui/views/omnibox/omnibox_view_win.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <locale> 8 #include <locale>
9 #include <string> 9 #include <string>
10 10
(...skipping 2661 matching lines...) Expand 10 before | Expand all | Expand 10 after
2672 // PosFromChar(i) might return 0 when i is greater than 1. 2672 // PosFromChar(i) might return 0 when i is greater than 1.
2673 return font_.GetStringWidth(text) + GetHorizontalMargin(); 2673 return font_.GetStringWidth(text) + GetHorizontalMargin();
2674 } 2674 }
2675 2675
2676 bool OmniboxViewWin::IsCaretAtEnd() const { 2676 bool OmniboxViewWin::IsCaretAtEnd() const {
2677 long length = GetTextLength(); 2677 long length = GetTextLength();
2678 CHARRANGE sel; 2678 CHARRANGE sel;
2679 GetSelection(sel); 2679 GetSelection(sel);
2680 return sel.cpMin == sel.cpMax && sel.cpMin == length; 2680 return sel.cpMin == sel.cpMax && sel.cpMin == length;
2681 } 2681 }
2682
2683 #if !defined(USE_AURA)
2684 // static
2685 OmniboxView* OmniboxView::CreateOmniboxView(
2686 AutocompleteEditController* controller,
2687 ToolbarModel* toolbar_model,
2688 Profile* profile,
2689 CommandUpdater* command_updater,
2690 bool popup_window_mode,
2691 LocationBarView* location_bar) {
2692 return new OmniboxViewWin(controller,
2693 toolbar_model,
2694 location_bar,
2695 command_updater,
2696 popup_window_mode,
2697 location_bar);
2698 }
2699 #endif
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_view_views.cc ('k') | chrome/browser/ui/views/omnibox/omnibox_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698