diff options
author | rohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-17 21:39:09 +0000 |
---|---|---|
committer | rohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-17 21:39:09 +0000 |
commit | 93e1840d65de867d2ec82c97191e9bc028581b68 (patch) | |
tree | bfa240b62f9e646b44ab869fac7b4b50fe7f90cf /chrome/browser/cocoa/find_bar_bridge.mm | |
parent | d61b508b17797ab48dbbf181d2cc5b2604cc8bad (diff) | |
download | chromium_src-93e1840d65de867d2ec82c97191e9bc028581b68.zip chromium_src-93e1840d65de867d2ec82c97191e9bc028581b68.tar.gz chromium_src-93e1840d65de867d2ec82c97191e9bc028581b68.tar.bz2 |
Initial implementation of the FindBar on Mac.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13969 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/find_bar_bridge.mm')
-rw-r--r-- | chrome/browser/cocoa/find_bar_bridge.mm | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/find_bar_bridge.mm b/chrome/browser/cocoa/find_bar_bridge.mm new file mode 100644 index 0000000..415273b --- /dev/null +++ b/chrome/browser/cocoa/find_bar_bridge.mm @@ -0,0 +1,69 @@ +// 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/find_bar_bridge.h" +#import "chrome/browser/cocoa/find_bar_cocoa_controller.h" + +FindBarBridge::FindBarBridge(BrowserWindowCocoa* window) { + cocoa_controller_.reset( + [[FindBarCocoaController alloc] initWithBrowserWindow:window]); + [cocoa_controller_ setFindBarBridge:this]; +} + +FindBarBridge::~FindBarBridge() { +} + +void FindBarBridge::Show() { + [cocoa_controller_ showFindBar]; +} + +void FindBarBridge::Hide(bool animate) { + [cocoa_controller_ hideFindBar]; +} + +void FindBarBridge::SetFocusAndSelection() { + [cocoa_controller_ setFocusAndSelection]; +} + +void FindBarBridge::ClearResults(const FindNotificationDetails& results) { + [cocoa_controller_ clearResults:results]; +} + +void FindBarBridge::SetFindText(const string16& find_text) { + [cocoa_controller_ setFindText:find_text]; +} + +void FindBarBridge::UpdateUIForFindResult(const FindNotificationDetails& result, + const string16& find_text) { + [cocoa_controller_ updateUIForFindResult:result withText:find_text]; +} + +bool FindBarBridge::IsFindBarVisible() { + return [cocoa_controller_ isFindBarVisible] ? true : false; +} + +void FindBarBridge::MoveWindowIfNecessary(const gfx::Rect& selection_rect, + bool no_redraw) { + NOTIMPLEMENTED(); +} + +void FindBarBridge::StopAnimation() { + NOTIMPLEMENTED(); +} + +gfx::Rect FindBarBridge::GetDialogPosition(gfx::Rect avoid_overlapping_rect) { + NOTIMPLEMENTED(); + return gfx::Rect(); +} + +void FindBarBridge::SetDialogPosition(const gfx::Rect& new_pos, + bool no_redraw) { + // TODO(rohitrao): Do something useful here. For now, just show the findbar. + NOTIMPLEMENTED(); + Show(); +} + +void FindBarBridge::RestoreSavedFocus() { + NOTIMPLEMENTED(); +} |