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

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

Issue 731423002: Remove OriginChip code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix gyp file and bad merge Created 5 years, 10 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
OLDNEW
1 // Copyright (c) 2012 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 // This file defines the interface class OmniboxView. Each toolkit will 5 // This file defines the interface class OmniboxView. Each toolkit will
6 // implement the edit view differently, so that code is inherently platform 6 // implement the edit view differently, so that code is inherently platform
7 // specific. However, the OmniboxEditModel needs to do some communication with 7 // specific. However, the OmniboxEditModel needs to do some communication with
8 // the view. Since the model is shared between platforms, we need to define an 8 // the view. Since the model is shared between platforms, we need to define an
9 // interface that all view implementations will share. 9 // interface that all view implementations will share.
10 10
(...skipping 26 matching lines...) Expand all
37 public: 37 public:
38 virtual ~OmniboxView(); 38 virtual ~OmniboxView();
39 39
40 // Used by the automation system for getting at the model from the view. 40 // Used by the automation system for getting at the model from the view.
41 OmniboxEditModel* model() { return model_.get(); } 41 OmniboxEditModel* model() { return model_.get(); }
42 const OmniboxEditModel* model() const { return model_.get(); } 42 const OmniboxEditModel* model() const { return model_.get(); }
43 43
44 CommandUpdater* command_updater() { return command_updater_; } 44 CommandUpdater* command_updater() { return command_updater_; }
45 const CommandUpdater* command_updater() const { return command_updater_; } 45 const CommandUpdater* command_updater() const { return command_updater_; }
46 46
47 // Handle mouse release events concerning the origin chip.
48 void HandleOriginChipMouseRelease();
49
50 // Shared cross-platform focus handling. 47 // Shared cross-platform focus handling.
51 void OnDidKillFocus(); 48 void OnDidKillFocus();
52 49
53 // For use when switching tabs, this saves the current state onto the tab so 50 // For use when switching tabs, this saves the current state onto the tab so
54 // that it can be restored during a later call to Update(). 51 // that it can be restored during a later call to Update().
55 virtual void SaveStateToTab(content::WebContents* tab) = 0; 52 virtual void SaveStateToTab(content::WebContents* tab) = 0;
56 53
57 // Called when the window's active tab changes. 54 // Called when the window's active tab changes.
58 virtual void OnTabChanged(const content::WebContents* web_contents) = 0; 55 virtual void OnTabChanged(const content::WebContents* web_contents) = 0;
59 56
60 // Called to clear the saved state for |web_contents|. 57 // Called to clear the saved state for |web_contents|.
61 virtual void ResetTabState(content::WebContents* web_contents) = 0; 58 virtual void ResetTabState(content::WebContents* web_contents) = 0;
62 59
63 // Called when any relevant state changes other than changing tabs. 60 // Called when any relevant state changes other than changing tabs.
64 virtual void Update() = 0; 61 virtual void Update() = 0;
65 62
66 // Updates the placeholder text with the value of GetHintText() if the 63 // Updates the placeholder text with the value of GetHintText() if hint texts
67 // origin chip is enabled. 64 // are enabled.
68 virtual void UpdatePlaceholderText() = 0; 65 virtual void UpdatePlaceholderText() = 0;
69 66
70 // Asks the browser to load the specified match, using the supplied 67 // Asks the browser to load the specified match, using the supplied
71 // disposition. |alternate_nav_url|, if non-empty, contains the 68 // disposition. |alternate_nav_url|, if non-empty, contains the
72 // alternate navigation URL for for this match. See comments on 69 // alternate navigation URL for for this match. See comments on
73 // AutocompleteResult::GetAlternateNavURL(). 70 // AutocompleteResult::GetAlternateNavURL().
74 // 71 //
75 // |pasted_text| should only be set if this call is due to a 72 // |pasted_text| should only be set if this call is due to a
76 // Paste-And-Go/Search action. 73 // Paste-And-Go/Search action.
77 // 74 //
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 // |model_| can be NULL in tests. 288 // |model_| can be NULL in tests.
292 scoped_ptr<OmniboxEditModel> model_; 289 scoped_ptr<OmniboxEditModel> model_;
293 OmniboxEditController* controller_; 290 OmniboxEditController* controller_;
294 291
295 // The object that handles additional command functionality exposed on the 292 // The object that handles additional command functionality exposed on the
296 // edit, such as invoking the keyword editor. 293 // edit, such as invoking the keyword editor.
297 CommandUpdater* command_updater_; 294 CommandUpdater* command_updater_;
298 }; 295 };
299 296
300 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_VIEW_H_ 297 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/omnibox/omnibox_edit_unittest.cc ('k') | chrome/browser/ui/omnibox/omnibox_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698