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

Unified Diff: chrome/browser/cocoa/find_bar_bridge.h

Issue 1061003: [Mac] Makes ctrl-return follow links when finding in page.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/cocoa/find_bar_bridge.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/find_bar_bridge.h
===================================================================
--- chrome/browser/cocoa/find_bar_bridge.h (revision 42265)
+++ chrome/browser/cocoa/find_bar_bridge.h (working copy)
@@ -1,19 +1,23 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
#ifndef CHROME_BROWSER_COCOA_FIND_BAR_BRIDGE_H_
#define CHROME_BROWSER_COCOA_FIND_BAR_BRIDGE_H_
-#import <Cocoa/Cocoa.h>
+#include "base/logging.h"
+#include "chrome/browser/find_bar.h"
-#import "base/logging.h"
-#import "base/scoped_nsobject.h"
-#import "chrome/browser/find_bar.h"
-
class BrowserWindowCocoa;
class FindBarController;
+
+// This class is included by find_bar_host_browsertest.cc, so it has to be
+// objc-free.
+#ifdef __OBJC__
@class FindBarCocoaController;
+#else
+class FindBarCocoaController;
+#endif
// Implementation of FindBar for the Mac. This class simply passes
// each message along to |cocoa_controller_|.
@@ -30,13 +34,14 @@
// object is owned by the Browser. FindBarCocoaController is retained
// by bother FindBarBridge and BrowserWindowController, since both use it.
-class FindBarBridge : public FindBar {
+class FindBarBridge : public FindBar,
+ public FindBarTesting {
public:
FindBarBridge();
virtual ~FindBarBridge();
FindBarCocoaController* find_bar_cocoa_controller() {
- return cocoa_controller_.get();
+ return cocoa_controller_;
}
virtual void SetFindBarController(FindBarController* find_bar_controller) {
@@ -49,8 +54,7 @@
}
virtual FindBarTesting* GetFindBarTesting() {
- NOTIMPLEMENTED();
- return NULL;
+ return this;
}
// Methods from FindBar.
@@ -68,10 +72,17 @@
virtual void MoveWindowIfNecessary(const gfx::Rect& selection_rect,
bool no_redraw);
+ // Methods from FindBarTesting.
+ virtual bool GetFindBarWindowInfo(gfx::Point* position,
+ bool* fully_visible);
+
+ // Used to disable find bar animations when testing.
+ static bool disable_animations_during_testing_;
+
private:
// Pointer to the cocoa controller which manages the cocoa view. Is
- // never null.
- scoped_nsobject<FindBarCocoaController> cocoa_controller_;
+ // never nil.
+ FindBarCocoaController* cocoa_controller_;
// Pointer back to the owning controller.
FindBarController* find_bar_controller_; // weak, owns us
« no previous file with comments | « no previous file | chrome/browser/cocoa/find_bar_bridge.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698