summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-24 17:51:22 +0000
committerrohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-24 17:51:22 +0000
commit4d9cf078fa29f9e4b530c909af386ef201e3a935 (patch)
tree4dda99a30ce36d34f2b6869e42072a567dcafb45
parent0387ae933d009e37f5fcba94544f356b45e617c1 (diff)
downloadchromium_src-4d9cf078fa29f9e4b530c909af386ef201e3a935.zip
chromium_src-4d9cf078fa29f9e4b530c909af386ef201e3a935.tar.gz
chromium_src-4d9cf078fa29f9e4b530c909af386ef201e3a935.tar.bz2
Removes FindBar cruft from TabContentsViewMac.
TEST=Ran Chromium, clicked around, found something in page. Nothing seems to have broken. Review URL: http://codereview.chromium.org/93124 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14442 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/tab_contents/tab_contents_view_mac.h18
-rw-r--r--chrome/browser/tab_contents/tab_contents_view_mac.mm53
-rw-r--r--chrome/common/temp_scaffolding_stubs.h20
3 files changed, 2 insertions, 89 deletions
diff --git a/chrome/browser/tab_contents/tab_contents_view_mac.h b/chrome/browser/tab_contents/tab_contents_view_mac.h
index ae40894..afd95bb1 100644
--- a/chrome/browser/tab_contents/tab_contents_view_mac.h
+++ b/chrome/browser/tab_contents/tab_contents_view_mac.h
@@ -49,31 +49,21 @@ class TabContentsViewMac : public TabContentsView,
virtual void SetPageTitle(const std::wstring& title);
virtual void Invalidate();
virtual void SizeContents(const gfx::Size& size);
- virtual void FindInPage(const Browser& browser,
- bool find_next, bool forward_direction);
- virtual void HideFindBar(bool end_session);
- virtual bool GetFindBarWindowInfo(gfx::Point* position,
- bool* fully_visible) const;
virtual void Focus();
virtual void SetInitialFocus();
virtual void StoreFocus();
virtual void RestoreFocus();
-
- // Backend implementation of RenderViewHostDelegate::View.
virtual RenderWidgetHostView* CreateNewWidgetInternal(int route_id,
bool activatable);
virtual void ShowCreatedWidgetInternal(RenderWidgetHostView* widget_host_view,
const gfx::Rect& initial_pos);
+
+ // Backend implementation of RenderViewHostDelegate::View.
virtual void ShowContextMenu(const ContextMenuParams& params);
virtual void StartDragging(const WebDropData& drop_data);
virtual void UpdateDragCursor(bool is_drop_target);
virtual void TakeFocus(bool reverse);
virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event);
- virtual void OnFindReply(int request_id,
- int number_of_matches,
- const gfx::Rect& selection_rect,
- int active_match_ordinal,
- bool final_update);
// NotificationObserver implementation ---------------------------------------
@@ -87,10 +77,6 @@ class TabContentsViewMac : public TabContentsView,
// The Cocoa NSView that lives in the view hierarchy.
scoped_nsobject<TabContentsViewCocoa> cocoa_view_;
- // For find in page. This may be NULL if there is no find bar, and if it is
- // non-NULL, it may or may not be visible.
- scoped_ptr<FindBarMac> find_bar_;
-
// Used to get notifications about renderers coming and going.
NotificationRegistrar registrar_;
diff --git a/chrome/browser/tab_contents/tab_contents_view_mac.mm b/chrome/browser/tab_contents/tab_contents_view_mac.mm
index d7e4398..2f08d70 100644
--- a/chrome/browser/tab_contents/tab_contents_view_mac.mm
+++ b/chrome/browser/tab_contents/tab_contents_view_mac.mm
@@ -88,9 +88,6 @@ void TabContentsViewMac::StartDragging(const WebDropData& drop_data) {
}
void TabContentsViewMac::OnContentsDestroy() {
- // TODO(avi):Close the find bar if any.
- if (find_bar_.get())
- find_bar_->Close();
}
void TabContentsViewMac::SetPageTitle(const std::wstring& title) {
@@ -106,45 +103,6 @@ void TabContentsViewMac::SizeContents(const gfx::Size& size) {
NOTIMPLEMENTED(); // Leaving the hack unimplemented.
}
-void TabContentsViewMac::FindInPage(const Browser& browser,
- bool find_next, bool forward_direction) {
- if (!find_bar_.get()) {
- // We want the Chrome top-level (Frame) window.
- NSWindow* window =
- static_cast<NSWindow*>(browser.window()->GetNativeHandle());
- find_bar_.reset(new FindBarMac(this, window));
- } else {
- find_bar_->Show();
- }
-
- if (find_next && !find_bar_->find_string().empty())
- find_bar_->StartFinding(forward_direction);
-}
-
-void TabContentsViewMac::HideFindBar(bool end_session) {
- if (find_bar_.get()) {
- if (end_session)
- find_bar_->EndFindSession();
- else
- find_bar_->DidBecomeUnselected();
- }
-}
-
-bool TabContentsViewMac::GetFindBarWindowInfo(gfx::Point* position,
- bool* fully_visible) const {
- if (!find_bar_.get() ||
- [find_bar_->GetView() isHidden]) {
- *position = gfx::Point(0, 0);
- *fully_visible = false;
- return false;
- }
-
- NSRect frame = [find_bar_->GetView() frame];
- *position = gfx::Point(frame.origin.x, frame.origin.y);
- *fully_visible = find_bar_->IsVisible() && !find_bar_->IsAnimating();
- return true;
-}
-
void TabContentsViewMac::Focus() {
}
@@ -173,17 +131,6 @@ void TabContentsViewMac::HandleKeyboardEvent(
[cocoa_view_.get() processKeyboardEvent:event.os_event];
}
-void TabContentsViewMac::OnFindReply(int request_id,
- int number_of_matches,
- const gfx::Rect& selection_rect,
- int active_match_ordinal,
- bool final_update) {
- if (find_bar_.get()) {
- find_bar_->OnFindReply(request_id, number_of_matches, selection_rect,
- active_match_ordinal, final_update);
- }
-}
-
void TabContentsViewMac::ShowContextMenu(const ContextMenuParams& params) {
RenderViewContextMenuMac menu(web_contents(),
params,
diff --git a/chrome/common/temp_scaffolding_stubs.h b/chrome/common/temp_scaffolding_stubs.h
index 93a3b7d..503c282 100644
--- a/chrome/common/temp_scaffolding_stubs.h
+++ b/chrome/common/temp_scaffolding_stubs.h
@@ -418,26 +418,6 @@ class HtmlDialogContents {
};
};
-#if defined(OS_MACOSX)
-
-class TabContentsView;
-
-class FindBarMac {
- public:
- FindBarMac(TabContentsView*, gfx::NativeWindow) { }
- void Show() { }
- void Close() { }
- void StartFinding(bool&) { }
- void EndFindSession() { }
- void DidBecomeUnselected() { }
- bool IsVisible() { return false; }
- bool IsAnimating() { return false; }
- gfx::NativeView GetView() { return nil; }
- std::string find_string() { return ""; }
- void OnFindReply(int, int, const gfx::Rect&, int, bool) { }
-};
-#endif
-
class LoginHandler {
public:
void SetAuth(const std::wstring& username,