OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_UI_COCOA_FIND_BAR_FIND_BAR_BRIDGE_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_FIND_BAR_FIND_BAR_BRIDGE_H_ |
6 #define CHROME_BROWSER_UI_COCOA_FIND_BAR_FIND_BAR_BRIDGE_H_ | 6 #define CHROME_BROWSER_UI_COCOA_FIND_BAR_FIND_BAR_BRIDGE_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "chrome/browser/ui/find_bar/find_bar.h" | 10 #include "chrome/browser/ui/find_bar/find_bar.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 public FindBarTesting { | 39 public FindBarTesting { |
40 public: | 40 public: |
41 FindBarBridge(Browser* browser); | 41 FindBarBridge(Browser* browser); |
42 virtual ~FindBarBridge(); | 42 virtual ~FindBarBridge(); |
43 | 43 |
44 FindBarCocoaController* find_bar_cocoa_controller() { | 44 FindBarCocoaController* find_bar_cocoa_controller() { |
45 return cocoa_controller_; | 45 return cocoa_controller_; |
46 } | 46 } |
47 | 47 |
48 virtual void SetFindBarController( | 48 virtual void SetFindBarController( |
49 FindBarController* find_bar_controller) OVERRIDE; | 49 FindBarController* find_bar_controller) override; |
50 | 50 |
51 virtual FindBarController* GetFindBarController() const OVERRIDE; | 51 virtual FindBarController* GetFindBarController() const override; |
52 | 52 |
53 virtual FindBarTesting* GetFindBarTesting() OVERRIDE; | 53 virtual FindBarTesting* GetFindBarTesting() override; |
54 | 54 |
55 // Methods from FindBar. | 55 // Methods from FindBar. |
56 virtual void Show(bool animate) OVERRIDE; | 56 virtual void Show(bool animate) override; |
57 virtual void Hide(bool animate) OVERRIDE; | 57 virtual void Hide(bool animate) override; |
58 virtual void SetFocusAndSelection() OVERRIDE; | 58 virtual void SetFocusAndSelection() override; |
59 virtual void ClearResults(const FindNotificationDetails& results) OVERRIDE; | 59 virtual void ClearResults(const FindNotificationDetails& results) override; |
60 virtual void StopAnimation() OVERRIDE; | 60 virtual void StopAnimation() override; |
61 virtual void SetFindTextAndSelectedRange( | 61 virtual void SetFindTextAndSelectedRange( |
62 const base::string16& find_text, | 62 const base::string16& find_text, |
63 const gfx::Range& selected_range) OVERRIDE; | 63 const gfx::Range& selected_range) override; |
64 virtual base::string16 GetFindText() OVERRIDE; | 64 virtual base::string16 GetFindText() override; |
65 virtual gfx::Range GetSelectedRange() OVERRIDE; | 65 virtual gfx::Range GetSelectedRange() override; |
66 virtual void UpdateUIForFindResult(const FindNotificationDetails& result, | 66 virtual void UpdateUIForFindResult(const FindNotificationDetails& result, |
67 const base::string16& find_text) OVERRIDE; | 67 const base::string16& find_text) override; |
68 virtual void AudibleAlert() OVERRIDE; | 68 virtual void AudibleAlert() override; |
69 virtual bool IsFindBarVisible() OVERRIDE; | 69 virtual bool IsFindBarVisible() override; |
70 virtual void RestoreSavedFocus() OVERRIDE; | 70 virtual void RestoreSavedFocus() override; |
71 virtual bool HasGlobalFindPasteboard() OVERRIDE; | 71 virtual bool HasGlobalFindPasteboard() override; |
72 virtual void UpdateFindBarForChangedWebContents() OVERRIDE; | 72 virtual void UpdateFindBarForChangedWebContents() override; |
73 virtual void MoveWindowIfNecessary(const gfx::Rect& selection_rect, | 73 virtual void MoveWindowIfNecessary(const gfx::Rect& selection_rect, |
74 bool no_redraw) OVERRIDE; | 74 bool no_redraw) override; |
75 | 75 |
76 // Methods from FindBarTesting. | 76 // Methods from FindBarTesting. |
77 virtual bool GetFindBarWindowInfo(gfx::Point* position, | 77 virtual bool GetFindBarWindowInfo(gfx::Point* position, |
78 bool* fully_visible) OVERRIDE; | 78 bool* fully_visible) override; |
79 virtual base::string16 GetFindSelectedText() OVERRIDE; | 79 virtual base::string16 GetFindSelectedText() override; |
80 virtual base::string16 GetMatchCountText() OVERRIDE; | 80 virtual base::string16 GetMatchCountText() override; |
81 virtual int GetWidth() OVERRIDE; | 81 virtual int GetWidth() override; |
82 | 82 |
83 // Used to disable find bar animations when testing. | 83 // Used to disable find bar animations when testing. |
84 static bool disable_animations_during_testing_; | 84 static bool disable_animations_during_testing_; |
85 | 85 |
86 private: | 86 private: |
87 // Pointer to the cocoa controller which manages the cocoa view. Is | 87 // Pointer to the cocoa controller which manages the cocoa view. Is |
88 // never nil. | 88 // never nil. |
89 FindBarCocoaController* cocoa_controller_; | 89 FindBarCocoaController* cocoa_controller_; |
90 | 90 |
91 // Pointer back to the owning controller. | 91 // Pointer back to the owning controller. |
92 FindBarController* find_bar_controller_; // weak, owns us | 92 FindBarController* find_bar_controller_; // weak, owns us |
93 | 93 |
94 DISALLOW_COPY_AND_ASSIGN(FindBarBridge); | 94 DISALLOW_COPY_AND_ASSIGN(FindBarBridge); |
95 }; | 95 }; |
96 | 96 |
97 #endif // CHROME_BROWSER_UI_COCOA_FIND_BAR_FIND_BAR_BRIDGE_H_ | 97 #endif // CHROME_BROWSER_UI_COCOA_FIND_BAR_FIND_BAR_BRIDGE_H_ |
OLD | NEW |