diff options
author | shess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-08 04:53:50 +0000 |
---|---|---|
committer | shess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-08 04:53:50 +0000 |
commit | a1481e294812aab9b6050db712669d2b75fea5a4 (patch) | |
tree | f3aabc41eafde15154a3c335fad39be6b648f320 /chrome/browser/cocoa/location_bar_view_mac.mm | |
parent | 8ff8763e823b748b56c5c688568cd1b449cf3465 (diff) | |
download | chromium_src-a1481e294812aab9b6050db712669d2b75fea5a4.zip chromium_src-a1481e294812aab9b6050db712669d2b75fea5a4.tar.gz chromium_src-a1481e294812aab9b6050db712669d2b75fea5a4.tar.bz2 |
Move location bar bridge out of tab_contents_controller.
[So that I don't keep getting conflicts as I work to finish the omnibox change
http://codereview.chromium.org/50074
]
Review URL: http://codereview.chromium.org/63096
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13342 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/location_bar_view_mac.mm')
-rw-r--r-- | chrome/browser/cocoa/location_bar_view_mac.mm | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/location_bar_view_mac.mm b/chrome/browser/cocoa/location_bar_view_mac.mm new file mode 100644 index 0000000..ed660b9 --- /dev/null +++ b/chrome/browser/cocoa/location_bar_view_mac.mm @@ -0,0 +1,34 @@ +// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import "chrome/browser/cocoa/location_bar_view_mac.h" + +#include "base/sys_string_conversions.h" +#include "chrome/browser/net/url_fixer_upper.h" + +LocationBarViewMac::LocationBarViewMac(NSTextField* field) + : field_(field) { + // TODO(shess): Placeholder for omnibox changes. +} + +LocationBarViewMac::~LocationBarViewMac() { + // TODO(shess): Placeholder for omnibox changes. +} + +void LocationBarViewMac::Init() { + // TODO(shess): Placeholder for omnibox changes. +} + +std::wstring LocationBarViewMac::GetInputString() const { + // TODO(shess): This code is temporary until the omnibox code takes + // over. + std::wstring url = base::SysNSStringToWide([field_ stringValue]); + + // Try to flesh out the input to make a real URL. + return URLFixerUpper::FixupURL(url, std::wstring()); +} + +void LocationBarViewMac::FocusLocation() { + [[field_ window] makeFirstResponder:field_]; +} |