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

Side by Side Diff: chrome/browser/autocomplete/autocomplete_edit.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 #ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_H_ 5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_H_
6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_H_ 6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/string16.h" 10 #include "base/string16.h"
11 #include "chrome/browser/autocomplete/autocomplete_controller_delegate.h" 11 #include "chrome/browser/autocomplete/autocomplete_controller_delegate.h"
12 #include "chrome/browser/autocomplete/autocomplete_match.h" 12 #include "chrome/browser/autocomplete/autocomplete_match.h"
13 #include "chrome/browser/autocomplete/network_action_predictor.h" 13 #include "chrome/browser/autocomplete/network_action_predictor.h"
14 #include "chrome/common/instant_types.h" 14 #include "chrome/common/instant_types.h"
15 #include "content/common/page_transition_types.h" 15 #include "content/public/common/page_transition_types.h"
16 #include "googleurl/src/gurl.h" 16 #include "googleurl/src/gurl.h"
17 #include "ui/gfx/native_widget_types.h" 17 #include "ui/gfx/native_widget_types.h"
18 #include "webkit/glue/window_open_disposition.h" 18 #include "webkit/glue/window_open_disposition.h"
19 19
20 class AutocompleteController; 20 class AutocompleteController;
21 class AutocompleteEditController; 21 class AutocompleteEditController;
22 class AutocompleteEditModel; 22 class AutocompleteEditModel;
23 class AutocompletePopupModel; 23 class AutocompletePopupModel;
24 class AutocompleteResult; 24 class AutocompleteResult;
25 class InstantController; 25 class InstantController;
(...skipping 16 matching lines...) Expand all
42 public: 42 public:
43 // When the user presses enter or selects a line with the mouse, this 43 // When the user presses enter or selects a line with the mouse, this
44 // function will get called synchronously with the url to open and 44 // function will get called synchronously with the url to open and
45 // disposition and transition to use when opening it. 45 // disposition and transition to use when opening it.
46 // 46 //
47 // |alternate_nav_url|, if non-empty, contains the alternate navigation URL 47 // |alternate_nav_url|, if non-empty, contains the alternate navigation URL
48 // for |url|, which the controller can check for existence. See comments on 48 // for |url|, which the controller can check for existence. See comments on
49 // AutocompleteResult::GetAlternateNavURL(). 49 // AutocompleteResult::GetAlternateNavURL().
50 virtual void OnAutocompleteAccept(const GURL& url, 50 virtual void OnAutocompleteAccept(const GURL& url,
51 WindowOpenDisposition disposition, 51 WindowOpenDisposition disposition,
52 PageTransition::Type transition, 52 content::PageTransition transition,
53 const GURL& alternate_nav_url) = 0; 53 const GURL& alternate_nav_url) = 0;
54 54
55 // Called when anything has changed that might affect the layout or contents 55 // Called when anything has changed that might affect the layout or contents
56 // of the views around the edit, including the text of the edit and the 56 // of the views around the edit, including the text of the edit and the
57 // status of any keyword- or hint-related state. 57 // status of any keyword- or hint-related state.
58 virtual void OnChanged() = 0; 58 virtual void OnChanged() = 0;
59 59
60 // Called when the selection of the OmniboxView changes. 60 // Called when the selection of the OmniboxView changes.
61 virtual void OnSelectionBoundsChanged() = 0; 61 virtual void OnSelectionBoundsChanged() = 0;
62 62
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 // appropriate so that the controller doesn't need to be repeatedly queried 227 // appropriate so that the controller doesn't need to be repeatedly queried
228 // for the same text in every clipboard-related function. 228 // for the same text in every clipboard-related function.
229 bool CanPasteAndGo(const string16& text) const; 229 bool CanPasteAndGo(const string16& text) const;
230 230
231 // Navigates to the destination last supplied to CanPasteAndGo. 231 // Navigates to the destination last supplied to CanPasteAndGo.
232 void PasteAndGo(); 232 void PasteAndGo();
233 233
234 // Returns true if this is a paste-and-search rather than paste-and-go (or 234 // Returns true if this is a paste-and-search rather than paste-and-go (or
235 // nothing). 235 // nothing).
236 bool is_paste_and_search() const { 236 bool is_paste_and_search() const {
237 return (paste_and_go_match_.transition != PageTransition::TYPED); 237 return (paste_and_go_match_.transition != content::PAGE_TRANSITION_TYPED);
238 } 238 }
239 239
240 // Asks the browser to load the popup's currently selected item, using the 240 // Asks the browser to load the popup's currently selected item, using the
241 // supplied disposition. This may close the popup. If |for_drop| is true, 241 // supplied disposition. This may close the popup. If |for_drop| is true,
242 // it indicates the input is being accepted as part of a drop operation and 242 // it indicates the input is being accepted as part of a drop operation and
243 // the transition should be treated as LINK (so that it won't trigger the 243 // the transition should be treated as LINK (so that it won't trigger the
244 // URL to be autocompleted). 244 // URL to be autocompleted).
245 void AcceptInput(WindowOpenDisposition disposition, 245 void AcceptInput(WindowOpenDisposition disposition,
246 bool for_drop); 246 bool for_drop);
247 247
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 // Last value of InstantCompleteBehavior supplied to |SetSuggestedText|. 555 // Last value of InstantCompleteBehavior supplied to |SetSuggestedText|.
556 InstantCompleteBehavior instant_complete_behavior_; 556 InstantCompleteBehavior instant_complete_behavior_;
557 557
558 // Used to determine what network actions to take in different circumstances. 558 // Used to determine what network actions to take in different circumstances.
559 NetworkActionPredictor network_action_predictor_; 559 NetworkActionPredictor network_action_predictor_;
560 560
561 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditModel); 561 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditModel);
562 }; 562 };
563 563
564 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_H_ 564 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_H_
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/autocomplete_browsertest.cc ('k') | chrome/browser/autocomplete/autocomplete_edit.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698