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

Side by Side Diff: content/public/browser/render_widget_host_view.h

Issue 2890143003: Move ContextMenu show/hide state tracking to WebContents (Closed)
Patch Set: Remove #if def Created 3 years, 6 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 #ifndef CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_
6 #define CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ 6 #define CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 // covered up by other windows), and as a result the view's renderer may be 115 // covered up by other windows), and as a result the view's renderer may be
116 // suspended. If Show() is called on a view then its state should be re-set to 116 // suspended. If Show() is called on a view then its state should be re-set to
117 // being un-occluded (an explicit WasUnOccluded call will not be made for 117 // being un-occluded (an explicit WasUnOccluded call will not be made for
118 // that). These calls are not necessarily made in pairs. 118 // that). These calls are not necessarily made in pairs.
119 virtual void WasUnOccluded() = 0; 119 virtual void WasUnOccluded() = 0;
120 virtual void WasOccluded() = 0; 120 virtual void WasOccluded() = 0;
121 121
122 // Retrieve the bounds of the View, in screen coordinates. 122 // Retrieve the bounds of the View, in screen coordinates.
123 virtual gfx::Rect GetViewBounds() const = 0; 123 virtual gfx::Rect GetViewBounds() const = 0;
124 124
125 // Returns true if the View's context menu is showing.
126 virtual bool IsShowingContextMenu() const = 0;
127
128 // Tells the View whether the context menu is showing.
129 virtual void SetShowingContextMenu(bool showing) = 0;
130
131 // Returns the currently selected text. 125 // Returns the currently selected text.
132 virtual base::string16 GetSelectedText() = 0; 126 virtual base::string16 GetSelectedText() = 0;
133 127
134 // Subclasses should override this method to set the background color. |color| 128 // Subclasses should override this method to set the background color. |color|
135 // has to be either SK_ColorTRANSPARENT or opaque. If set to 129 // has to be either SK_ColorTRANSPARENT or opaque. If set to
136 // SK_ColorTRANSPARENT, the renderer's background color will be overridden to 130 // SK_ColorTRANSPARENT, the renderer's background color will be overridden to
137 // be fully transparent. 131 // be fully transparent.
138 virtual void SetBackgroundColor(SkColor color) = 0; 132 virtual void SetBackgroundColor(SkColor color) = 0;
139 virtual SkColor background_color() const = 0; 133 virtual SkColor background_color() const = 0;
140 // Convenience method to fill the background layer with the default color by 134 // Convenience method to fill the background layer with the default color by
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 // Returns |true| if text is currently being spoken by Mac OS X. 246 // Returns |true| if text is currently being spoken by Mac OS X.
253 virtual bool IsSpeaking() const = 0; 247 virtual bool IsSpeaking() const = 0;
254 // Stops speaking, if it is currently in progress. 248 // Stops speaking, if it is currently in progress.
255 virtual void StopSpeaking() = 0; 249 virtual void StopSpeaking() = 0;
256 #endif // defined(OS_MACOSX) 250 #endif // defined(OS_MACOSX)
257 }; 251 };
258 252
259 } // namespace content 253 } // namespace content
260 254
261 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_ 255 #endif // CONTENT_PUBLIC_BROWSER_RENDER_WIDGET_HOST_VIEW_H_
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | content/public/browser/web_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698