| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_TEST_BASE_TEST_LOCATION_BAR_H_ | 5 #ifndef CHROME_TEST_BASE_TEST_LOCATION_BAR_H_ |
| 6 #define CHROME_TEST_BASE_TEST_LOCATION_BAR_H_ | 6 #define CHROME_TEST_BASE_TEST_LOCATION_BAR_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" |
| 9 #include "base/string16.h" | 10 #include "base/string16.h" |
| 10 #include "chrome/browser/first_run/first_run.h" | |
| 11 #include "chrome/browser/ui/omnibox/location_bar.h" | 11 #include "chrome/browser/ui/omnibox/location_bar.h" |
| 12 #include "content/public/common/page_transition_types.h" | 12 #include "content/public/common/page_transition_types.h" |
| 13 #include "webkit/glue/window_open_disposition.h" | 13 #include "webkit/glue/window_open_disposition.h" |
| 14 | 14 |
| 15 class TestLocationBar : public LocationBar { | 15 class TestLocationBar : public LocationBar { |
| 16 public: | 16 public: |
| 17 TestLocationBar(); | 17 TestLocationBar(); |
| 18 virtual ~TestLocationBar(); | 18 virtual ~TestLocationBar(); |
| 19 | 19 |
| 20 void set_input_string(const string16& input_string) { | 20 void set_input_string(const string16& input_string) { |
| 21 input_string_ = input_string; | 21 input_string_ = input_string; |
| 22 } | 22 } |
| 23 void set_disposition(WindowOpenDisposition disposition) { | 23 void set_disposition(WindowOpenDisposition disposition) { |
| 24 disposition_ = disposition; | 24 disposition_ = disposition; |
| 25 } | 25 } |
| 26 void set_transition(content::PageTransition transition) { | 26 void set_transition(content::PageTransition transition) { |
| 27 transition_ = transition; | 27 transition_ = transition; |
| 28 } | 28 } |
| 29 | 29 |
| 30 // Overridden from LocationBar: | 30 // Overridden from LocationBar: |
| 31 virtual void ShowFirstRunBubble(FirstRun::BubbleType bubble_type) OVERRIDE {} | 31 virtual void ShowFirstRunBubble() OVERRIDE {} |
| 32 virtual void SetSuggestedText(const string16& text, | 32 virtual void SetSuggestedText(const string16& text, |
| 33 InstantCompleteBehavior behavior) OVERRIDE {} | 33 InstantCompleteBehavior behavior) OVERRIDE {} |
| 34 virtual string16 GetInputString() const OVERRIDE; | 34 virtual string16 GetInputString() const OVERRIDE; |
| 35 virtual WindowOpenDisposition GetWindowOpenDisposition() const OVERRIDE; | 35 virtual WindowOpenDisposition GetWindowOpenDisposition() const OVERRIDE; |
| 36 virtual content::PageTransition GetPageTransition() const OVERRIDE; | 36 virtual content::PageTransition GetPageTransition() const OVERRIDE; |
| 37 virtual void AcceptInput() OVERRIDE {} | 37 virtual void AcceptInput() OVERRIDE {} |
| 38 virtual void FocusLocation(bool select_all) OVERRIDE {} | 38 virtual void FocusLocation(bool select_all) OVERRIDE {} |
| 39 virtual void FocusSearch() OVERRIDE {} | 39 virtual void FocusSearch() OVERRIDE {} |
| 40 virtual void UpdateContentSettingsIcons() OVERRIDE {} | 40 virtual void UpdateContentSettingsIcons() OVERRIDE {} |
| 41 virtual void UpdatePageActions() OVERRIDE {} | 41 virtual void UpdatePageActions() OVERRIDE {} |
| (...skipping 10 matching lines...) Expand all Loading... |
| 52 // interface. | 52 // interface. |
| 53 string16 input_string_; | 53 string16 input_string_; |
| 54 WindowOpenDisposition disposition_; | 54 WindowOpenDisposition disposition_; |
| 55 content::PageTransition transition_; | 55 content::PageTransition transition_; |
| 56 | 56 |
| 57 DISALLOW_COPY_AND_ASSIGN(TestLocationBar); | 57 DISALLOW_COPY_AND_ASSIGN(TestLocationBar); |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 | 60 |
| 61 #endif // CHROME_TEST_BASE_TEST_LOCATION_BAR_H_ | 61 #endif // CHROME_TEST_BASE_TEST_LOCATION_BAR_H_ |
| OLD | NEW |