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

Side by Side Diff: chrome/browser/ui/omnibox/location_bar.h

Issue 8253002: Move PageTransition into content namespace. While I'm touching all these files, I've also updated... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 // The LocationBar class is a virtual interface, defining access to the 5 // The LocationBar class is a virtual interface, defining access to the
6 // window's location bar component. This class exists so that cross-platform 6 // window's location bar component. This class exists so that cross-platform
7 // components like the browser command system can talk to the platform 7 // components like the browser command system can talk to the platform
8 // specific implementations of the location bar control. It also allows the 8 // specific implementations of the location bar control. It also allows the
9 // location bar to be mocked for testing. 9 // location bar to be mocked for testing.
10 10
11 #ifndef CHROME_BROWSER_UI_OMNIBOX_LOCATION_BAR_H_ 11 #ifndef CHROME_BROWSER_UI_OMNIBOX_LOCATION_BAR_H_
12 #define CHROME_BROWSER_UI_OMNIBOX_LOCATION_BAR_H_ 12 #define CHROME_BROWSER_UI_OMNIBOX_LOCATION_BAR_H_
13 #pragma once 13 #pragma once
14 14
15 #include <string> 15 #include <string>
16 16
17 #include "base/string16.h" 17 #include "base/string16.h"
18 #include "chrome/browser/first_run/first_run.h" 18 #include "chrome/browser/first_run/first_run.h"
19 #include "chrome/browser/instant/instant_delegate.h" 19 #include "chrome/browser/instant/instant_delegate.h"
20 #include "content/common/page_transition_types.h" 20 #include "content/public/common/page_transition_types.h"
21 #include "webkit/glue/window_open_disposition.h" 21 #include "webkit/glue/window_open_disposition.h"
22 22
23 class ExtensionAction; 23 class ExtensionAction;
24 class InstantController; 24 class InstantController;
25 class LocationBarTesting; 25 class LocationBarTesting;
26 class OmniboxView; 26 class OmniboxView;
27 class TabContents; 27 class TabContents;
28 class TabContentsWrapper; 28 class TabContentsWrapper;
29 29
30 class LocationBar { 30 class LocationBar {
31 public: 31 public:
32 // Shows the first run information bubble anchored to the location bar. 32 // Shows the first run information bubble anchored to the location bar.
33 virtual void ShowFirstRunBubble(FirstRun::BubbleType bubble_type) = 0; 33 virtual void ShowFirstRunBubble(FirstRun::BubbleType bubble_type) = 0;
34 34
35 // Sets the suggested text to show in the omnibox. This is shown in addition 35 // Sets the suggested text to show in the omnibox. This is shown in addition
36 // to the current text of the omnibox. 36 // to the current text of the omnibox.
37 virtual void SetSuggestedText(const string16& text, 37 virtual void SetSuggestedText(const string16& text,
38 InstantCompleteBehavior behavior) = 0; 38 InstantCompleteBehavior behavior) = 0;
39 39
40 // Returns the string of text entered in the location bar. 40 // Returns the string of text entered in the location bar.
41 virtual string16 GetInputString() const = 0; 41 virtual string16 GetInputString() const = 0;
42 42
43 // Returns the WindowOpenDisposition that should be used to determine where 43 // Returns the WindowOpenDisposition that should be used to determine where
44 // to open a URL entered in the location bar. 44 // to open a URL entered in the location bar.
45 virtual WindowOpenDisposition GetWindowOpenDisposition() const = 0; 45 virtual WindowOpenDisposition GetWindowOpenDisposition() const = 0;
46 46
47 // Returns the PageTransition that should be recorded in history when the URL 47 // Returns the PageTransition that should be recorded in history when the URL
48 // entered in the location bar is loaded. 48 // entered in the location bar is loaded.
49 virtual PageTransition::Type GetPageTransition() const = 0; 49 virtual content::PageTransition GetPageTransition() const = 0;
50 50
51 // Accepts the current string of text entered in the location bar. 51 // Accepts the current string of text entered in the location bar.
52 virtual void AcceptInput() = 0; 52 virtual void AcceptInput() = 0;
53 53
54 // Focuses the location bar. Optionally also selects its contents. 54 // Focuses the location bar. Optionally also selects its contents.
55 virtual void FocusLocation(bool select_all) = 0; 55 virtual void FocusLocation(bool select_all) = 0;
56 56
57 // Clears the location bar, inserts an annoying little "?" turd and sets 57 // Clears the location bar, inserts an annoying little "?" turd and sets
58 // focus to it. 58 // focus to it.
59 virtual void FocusSearch() = 0; 59 virtual void FocusSearch() = 0;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 virtual ExtensionAction* GetVisiblePageAction(size_t index) = 0; 101 virtual ExtensionAction* GetVisiblePageAction(size_t index) = 0;
102 102
103 // Simulates a left mouse pressed on the visible page action at |index|. 103 // Simulates a left mouse pressed on the visible page action at |index|.
104 virtual void TestPageActionPressed(size_t index) = 0; 104 virtual void TestPageActionPressed(size_t index) = 0;
105 105
106 protected: 106 protected:
107 virtual ~LocationBarTesting() {} 107 virtual ~LocationBarTesting() {}
108 }; 108 };
109 109
110 #endif // CHROME_BROWSER_UI_OMNIBOX_LOCATION_BAR_H_ 110 #endif // CHROME_BROWSER_UI_OMNIBOX_LOCATION_BAR_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/login/login_prompt_browsertest.cc ('k') | chrome/browser/ui/omnibox/omnibox_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698