OLD | NEW |
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 #ifndef CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_CONTROLLER_H_ |
7 | 7 |
8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
9 #include "content/public/common/page_transition_types.h" | 9 #include "content/public/common/page_transition_types.h" |
10 #include "ui/base/window_open_disposition.h" | 10 #include "ui/base/window_open_disposition.h" |
11 | 11 |
12 class GURL; | 12 class GURL; |
13 class InstantController; | 13 class InstantController; |
14 | 14 |
15 namespace content { | 15 namespace content { |
16 class WebContents; | 16 class WebContents; |
17 } | 17 } |
18 | 18 |
19 namespace gfx { | 19 namespace gfx { |
20 class Image; | 20 class Image; |
21 class Rect; | |
22 } | 21 } |
23 | 22 |
24 // I am in hack-and-slash mode right now. | 23 // I am in hack-and-slash mode right now. |
25 // http://code.google.com/p/chromium/issues/detail?id=6772 | 24 // http://code.google.com/p/chromium/issues/detail?id=6772 |
26 | 25 |
27 // Embedders of an AutocompleteEdit widget must implement this class. | 26 // Embedders of an AutocompleteEdit widget must implement this class. |
28 class OmniboxEditController { | 27 class OmniboxEditController { |
29 public: | 28 public: |
30 // When the user presses enter or selects a line with the mouse, this | 29 // When the user presses enter or selects a line with the mouse, this |
31 // function will get called synchronously with the url to open and | 30 // function will get called synchronously with the url to open and |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 | 62 |
64 // Returns the title of the current page. | 63 // Returns the title of the current page. |
65 virtual string16 GetTitle() const = 0; | 64 virtual string16 GetTitle() const = 0; |
66 | 65 |
67 // Returns the InstantController, or NULL if instant is not enabled. | 66 // Returns the InstantController, or NULL if instant is not enabled. |
68 virtual InstantController* GetInstant() = 0; | 67 virtual InstantController* GetInstant() = 0; |
69 | 68 |
70 // Returns the WebContents of the currently active tab. | 69 // Returns the WebContents of the currently active tab. |
71 virtual content::WebContents* GetWebContents() const = 0; | 70 virtual content::WebContents* GetWebContents() const = 0; |
72 | 71 |
73 // Returns the bounds for the omnibox. | |
74 virtual gfx::Rect GetOmniboxBounds() const = 0; | |
75 | |
76 protected: | 72 protected: |
77 virtual ~OmniboxEditController() {} | 73 virtual ~OmniboxEditController() {} |
78 }; | 74 }; |
79 | 75 |
80 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_CONTROLLER_H_ | 76 #endif // CHROME_BROWSER_UI_OMNIBOX_OMNIBOX_EDIT_CONTROLLER_H_ |
OLD | NEW |