Apply clang-format to all C, C++ and ObjC files (issue #2171)

This commit is contained in:
Marshall Greenblatt
2017-05-17 11:29:28 +02:00
parent a566549e04
commit 31d9407ee2
1331 changed files with 33014 additions and 32258 deletions

View File

@@ -61,14 +61,14 @@ class CefBoxLayout : public CefLayout {
// not resized. Flex values must not be negative.
///
/*--cef()--*/
virtual void SetFlexForView(CefRefPtr<CefView> view, int flex) =0;
virtual void SetFlexForView(CefRefPtr<CefView> view, int flex) = 0;
///
// Clears the flex for the given |view|, causing it to use the default flex
// specified via CefBoxLayoutSettings.default_flex.
///
/*--cef()--*/
virtual void ClearFlexForView(CefRefPtr<CefView> view) =0;
virtual void ClearFlexForView(CefRefPtr<CefView> view) = 0;
};
#endif // CEF_INCLUDE_VIEWS_CEF_BOX_LAYOUT_H_

View File

@@ -73,7 +73,7 @@ class CefBrowserView : public CefView {
// browser has not yet been created or has already been destroyed.
///
/*--cef()--*/
virtual CefRefPtr<CefBrowser> GetBrowser() =0;
virtual CefRefPtr<CefBrowser> GetBrowser() = 0;
///
// Sets whether accelerators registered with CefWindow::SetAccelerator are
@@ -85,7 +85,7 @@ class CefBrowserView : public CefView {
// CefKeyboardHandler. The default value is false.
///
/*--cef()--*/
virtual void SetPreferAccelerators(bool prefer_accelerators) =0;
virtual void SetPreferAccelerators(bool prefer_accelerators) = 0;
};
#endif // CEF_INCLUDE_VIEWS_CEF_BROWSER_VIEW_H_

View File

@@ -54,38 +54,38 @@ class CefButton : public CefView {
// Returns this Button as a LabelButton or NULL if this is not a LabelButton.
///
/*--cef()--*/
virtual CefRefPtr<CefLabelButton> AsLabelButton() =0;
virtual CefRefPtr<CefLabelButton> AsLabelButton() = 0;
///
// Sets the current display state of the Button.
///
/*--cef()--*/
virtual void SetState(cef_button_state_t state) =0;
virtual void SetState(cef_button_state_t state) = 0;
///
// Returns the current display state of the Button.
///
/*--cef(default_retval=CEF_BUTTON_STATE_NORMAL)--*/
virtual cef_button_state_t GetState() =0;
virtual cef_button_state_t GetState() = 0;
///
// Sets the Button will use an ink drop effect for displaying state changes.
///
/*--cef()--*/
virtual void SetInkDropEnabled(bool enabled) =0;
virtual void SetInkDropEnabled(bool enabled) = 0;
///
// Sets the tooltip text that will be displayed when the user hovers the mouse
// cursor over the Button.
///
/*--cef()--*/
virtual void SetTooltipText(const CefString& tooltip_text) =0;
virtual void SetTooltipText(const CefString& tooltip_text) = 0;
///
// Sets the accessible name that will be exposed to assistive technology (AT).
///
/*--cef()--*/
virtual void SetAccessibleName(const CefString& name) =0;
virtual void SetAccessibleName(const CefString& name) = 0;
};
#endif // CEF_INCLUDE_VIEWS_CEF_BUTTON_H_

View File

@@ -53,13 +53,13 @@ class CefButtonDelegate : public CefViewDelegate {
// Called when |button| is pressed.
///
/*--cef()--*/
virtual void OnButtonPressed(CefRefPtr<CefButton> button) =0;
virtual void OnButtonPressed(CefRefPtr<CefButton> button) = 0;
///
// Called when the state of |button| changes.
///
/*--cef()--*/
virtual void OnButtonStateChanged(CefRefPtr<CefButton> button) {};
virtual void OnButtonStateChanged(CefRefPtr<CefButton> button){};
};
#endif // CEF_INCLUDE_VIEWS_CEF_BUTTON_DELEGATE_H_

View File

@@ -90,13 +90,13 @@ class CefDisplay : public CefBaseRefCounted {
// intended to return distinct, usable displays.
///
/*--cef(count_func=displays:GetDisplayCount)--*/
static void GetAllDisplays(std::vector<CefRefPtr<CefDisplay> >& displays);
static void GetAllDisplays(std::vector<CefRefPtr<CefDisplay>>& displays);
///
// Returns the unique identifier for this Display.
///
/*--cef()--*/
virtual int64 GetID() =0;
virtual int64 GetID() = 0;
///
// Returns this Display's device pixel scale factor. This specifies how much
@@ -105,40 +105,40 @@ class CefDisplay : public CefBaseRefCounted {
// differ by platform.
///
/*--cef()--*/
virtual float GetDeviceScaleFactor() =0;
virtual float GetDeviceScaleFactor() = 0;
///
// Convert |point| from density independent pixels (DIP) to pixel coordinates
// using this Display's device scale factor.
///
/*--cef()--*/
virtual void ConvertPointToPixels(CefPoint& point) =0;
virtual void ConvertPointToPixels(CefPoint& point) = 0;
///
// Convert |point| from pixel coordinates to density independent pixels (DIP)
// using this Display's device scale factor.
///
/*--cef()--*/
virtual void ConvertPointFromPixels(CefPoint& point) =0;
virtual void ConvertPointFromPixels(CefPoint& point) = 0;
///
// Returns this Display's bounds. This is the full size of the display.
///
/*--cef()--*/
virtual CefRect GetBounds() =0;
virtual CefRect GetBounds() = 0;
///
// Returns this Display's work area. This excludes areas of the display that
// are occupied for window manager toolbars, etc.
///
/*--cef()--*/
virtual CefRect GetWorkArea() =0;
virtual CefRect GetWorkArea() = 0;
///
// Returns this Display's rotation in degrees.
///
/*--cef()--*/
virtual int GetRotation() =0;
virtual int GetRotation() = 0;
};
#endif // CEF_INCLUDE_VIEWS_CEF_DISPLAY_H_

View File

@@ -46,7 +46,6 @@
// UI thread unless otherwise indicated.
///
/*--cef(source=library)--*/
class CefFillLayout : public CefLayout {
};
class CefFillLayout : public CefLayout {};
#endif // CEF_INCLUDE_VIEWS_CEF_FILL_LAYOUT_H_

View File

@@ -71,20 +71,20 @@ class CefLabelButton : public CefButton {
// MenuButton.
///
/*--cef()--*/
virtual CefRefPtr<CefMenuButton> AsMenuButton() =0;
virtual CefRefPtr<CefMenuButton> AsMenuButton() = 0;
///
// Sets the text shown on the LabelButton. By default |text| will also be used
// as the accessible name.
///
/*--cef()--*/
virtual void SetText(const CefString& text) =0;
virtual void SetText(const CefString& text) = 0;
///
// Returns the text shown on the LabelButton.
///
/*--cef()--*/
virtual CefString GetText() =0;
virtual CefString GetText() = 0;
///
// Sets the image shown for |button_state|. When this Button is drawn if no
@@ -93,26 +93,27 @@ class CefLabelButton : public CefButton {
///
/*--cef(optional_param=image)--*/
virtual void SetImage(cef_button_state_t button_state,
CefRefPtr<CefImage> image) =0;
CefRefPtr<CefImage> image) = 0;
///
// Returns the image shown for |button_state|. If no image exists for that
// state then the image for CEF_BUTTON_STATE_NORMAL will be returned.
///
/*--cef()--*/
virtual CefRefPtr<CefImage> GetImage(cef_button_state_t button_state) =0;
virtual CefRefPtr<CefImage> GetImage(cef_button_state_t button_state) = 0;
///
// Sets the text color shown for the specified button |for_state| to |color|.
///
/*--cef()--*/
virtual void SetTextColor(cef_button_state_t for_state, cef_color_t color) =0;
virtual void SetTextColor(cef_button_state_t for_state,
cef_color_t color) = 0;
///
// Sets the text colors shown for the non-disabled states to |color|.
///
/*--cef()--*/
virtual void SetEnabledTextColors(cef_color_t color) =0;
virtual void SetEnabledTextColors(cef_color_t color) = 0;
///
// Sets the font list. The format is "<FONT_FAMILY_LIST>,[STYLES] <SIZE>",
@@ -127,26 +128,26 @@ class CefLabelButton : public CefButton {
// - "Arial, 14px"
///
/*--cef()--*/
virtual void SetFontList(const CefString& font_list) =0;
virtual void SetFontList(const CefString& font_list) = 0;
///
// Sets the horizontal alignment; reversed in RTL. Default is
// CEF_HORIZONTAL_ALIGNMENT_CENTER.
///
/*--cef()--*/
virtual void SetHorizontalAlignment(cef_horizontal_alignment_t alignment) =0;
virtual void SetHorizontalAlignment(cef_horizontal_alignment_t alignment) = 0;
///
// Reset the minimum size of this LabelButton to |size|.
///
/*--cef()--*/
virtual void SetMinimumSize(const CefSize& size) =0;
virtual void SetMinimumSize(const CefSize& size) = 0;
///
// Reset the maximum size of this LabelButton to |size|.
///
/*--cef()--*/
virtual void SetMaximumSize(const CefSize& size) =0;
virtual void SetMaximumSize(const CefSize& size) = 0;
};
#endif // CEF_INCLUDE_VIEWS_CEF_LABEL_BUTTON_H_

View File

@@ -55,19 +55,19 @@ class CefLayout : public CefBaseRefCounted {
// Returns this Layout as a BoxLayout or NULL if this is not a BoxLayout.
///
/*--cef()--*/
virtual CefRefPtr<CefBoxLayout> AsBoxLayout() =0;
virtual CefRefPtr<CefBoxLayout> AsBoxLayout() = 0;
///
// Returns this Layout as a FillLayout or NULL if this is not a FillLayout.
///
/*--cef()--*/
virtual CefRefPtr<CefFillLayout> AsFillLayout() =0;
virtual CefRefPtr<CefFillLayout> AsFillLayout() = 0;
///
// Returns true if this Layout is valid.
///
/*--cef()--*/
virtual bool IsValid() =0;
virtual bool IsValid() = 0;
};
#endif // CEF_INCLUDE_VIEWS_CEF_LAYOUT_H_

View File

@@ -77,14 +77,14 @@ class CefMenuButton : public CefLabelButton {
/*--cef()--*/
virtual void ShowMenu(CefRefPtr<CefMenuModel> menu_model,
const CefPoint& screen_point,
cef_menu_anchor_position_t anchor_position) =0;
cef_menu_anchor_position_t anchor_position) = 0;
///
// Show the menu for this button. Results in a call to
// CefMenuButtonDelegate::OnMenuButtonPressed().
///
/*--cef()--*/
virtual void TriggerMenu() =0;
virtual void TriggerMenu() = 0;
};
#endif // CEF_INCLUDE_VIEWS_CEF_MENU_BUTTON_H_

View File

@@ -56,7 +56,7 @@ class CefMenuButtonDelegate : public CefButtonDelegate {
///
/*--cef()--*/
virtual void OnMenuButtonPressed(CefRefPtr<CefMenuButton> menu_button,
const CefPoint& screen_point) =0;
const CefPoint& screen_point) = 0;
};
#endif // CEF_INCLUDE_VIEWS_CEF_MENU_BUTTON_DELEGATE_H_

View File

@@ -38,8 +38,8 @@
#define CEF_INCLUDE_VIEWS_CEF_PANEL_H_
#pragma once
#include "include/views/cef_view.h"
#include "include/views/cef_panel_delegate.h"
#include "include/views/cef_view.h"
class CefBoxLayout;
class CefFillLayout;
@@ -64,80 +64,78 @@ class CefPanel : public CefView {
// Returns this Panel as a Window or NULL if this is not a Window.
///
/*--cef()--*/
virtual CefRefPtr<CefWindow> AsWindow() =0;
virtual CefRefPtr<CefWindow> AsWindow() = 0;
///
// Set this Panel's Layout to FillLayout and return the FillLayout object.
///
/*--cef()--*/
virtual CefRefPtr<CefFillLayout> SetToFillLayout() =0;
virtual CefRefPtr<CefFillLayout> SetToFillLayout() = 0;
///
// Set this Panel's Layout to BoxLayout and return the BoxLayout object.
///
/*--cef()--*/
virtual CefRefPtr<CefBoxLayout> SetToBoxLayout(
const CefBoxLayoutSettings& settings) =0;
const CefBoxLayoutSettings& settings) = 0;
///
// Get the Layout.
///
/*--cef()--*/
virtual CefRefPtr<CefLayout> GetLayout() =0;
virtual CefRefPtr<CefLayout> GetLayout() = 0;
///
// Lay out the child Views (set their bounds based on sizing heuristics
// specific to the current Layout).
///
/*--cef()--*/
virtual void Layout() =0;
virtual void Layout() = 0;
///
// Add a child View.
///
/*--cef()--*/
virtual void AddChildView(CefRefPtr<CefView> view) =0;
virtual void AddChildView(CefRefPtr<CefView> view) = 0;
///
// Add a child View at the specified |index|. If |index| matches the result of
// GetChildCount() then the View will be added at the end.
///
/*--cef(index_param=index)--*/
virtual void AddChildViewAt(CefRefPtr<CefView> view,
int index) =0;
virtual void AddChildViewAt(CefRefPtr<CefView> view, int index) = 0;
///
// Move the child View to the specified |index|. A negative value for |index|
// will move the View to the end.
///
/*--cef()--*/
virtual void ReorderChildView(CefRefPtr<CefView> view,
int index) =0;
virtual void ReorderChildView(CefRefPtr<CefView> view, int index) = 0;
///
// Remove a child View. The View can then be added to another Panel.
///
/*--cef()--*/
virtual void RemoveChildView(CefRefPtr<CefView> view) =0;
virtual void RemoveChildView(CefRefPtr<CefView> view) = 0;
///
// Remove all child Views. The removed Views will be deleted if the client
// holds no references to them.
///
/*--cef()--*/
virtual void RemoveAllChildViews() =0;
virtual void RemoveAllChildViews() = 0;
///
// Returns the number of child Views.
///
/*--cef()--*/
virtual size_t GetChildViewCount() =0;
virtual size_t GetChildViewCount() = 0;
///
// Returns the child View at the specified |index|.
///
/*--cef(index_param=index)--*/
virtual CefRefPtr<CefView> GetChildViewAt(int index) =0;
virtual CefRefPtr<CefView> GetChildViewAt(int index) = 0;
};
#endif // CEF_INCLUDE_VIEWS_CEF_PANEL_H_

View File

@@ -45,7 +45,6 @@
// will be called on the browser process UI thread unless otherwise indicated.
///
/*--cef(source=client)--*/
class CefPanelDelegate : public CefViewDelegate {
};
class CefPanelDelegate : public CefViewDelegate {};
#endif // CEF_INCLUDE_VIEWS_CEF_PANEL_DELEGATE_H_

View File

@@ -60,43 +60,43 @@ class CefScrollView : public CefView {
// via CefView::SetBounds or CefViewDelegate::GetPreferredSize).
///
/*--cef()--*/
virtual void SetContentView(CefRefPtr<CefView> view) =0;
virtual void SetContentView(CefRefPtr<CefView> view) = 0;
///
// Returns the content View.
///
/*--cef()--*/
virtual CefRefPtr<CefView> GetContentView() =0;
virtual CefRefPtr<CefView> GetContentView() = 0;
///
// Returns the visible region of the content View.
///
/*--cef()--*/
virtual CefRect GetVisibleContentRect() =0;
virtual CefRect GetVisibleContentRect() = 0;
///
// Returns true if the horizontal scrollbar is currently showing.
///
/*--cef()--*/
virtual bool HasHorizontalScrollbar() =0;
virtual bool HasHorizontalScrollbar() = 0;
///
// Returns the height of the horizontal scrollbar.
///
/*--cef()--*/
virtual int GetHorizontalScrollbarHeight() =0;
virtual int GetHorizontalScrollbarHeight() = 0;
///
// Returns true if the vertical scrollbar is currently showing.
///
/*--cef()--*/
virtual bool HasVerticalScrollbar() =0;
virtual bool HasVerticalScrollbar() = 0;
///
// Returns the width of the vertical scrollbar.
///
/*--cef()--*/
virtual int GetVerticalScrollbarWidth() =0;
virtual int GetVerticalScrollbarWidth() = 0;
};
#endif // CEF_INCLUDE_VIEWS_CEF_SCROLL_VIEW_H_

View File

@@ -38,8 +38,8 @@
#define CEF_INCLUDE_VIEWS_CEF_TEXTFIELD_H_
#pragma once
#include "include/views/cef_view.h"
#include "include/views/cef_textfield_delegate.h"
#include "include/views/cef_view.h"
///
// A Textfield supports editing of text. This control is custom rendered with no
@@ -60,62 +60,62 @@ class CefTextfield : public CefView {
// Sets whether the text will be displayed as asterisks.
///
/*--cef()--*/
virtual void SetPasswordInput(bool password_input) =0;
virtual void SetPasswordInput(bool password_input) = 0;
///
// Returns true if the text will be displayed as asterisks.
///
/*--cef()--*/
virtual bool IsPasswordInput() =0;
virtual bool IsPasswordInput() = 0;
///
// Sets whether the text will read-only.
///
/*--cef()--*/
virtual void SetReadOnly(bool read_only) =0;
virtual void SetReadOnly(bool read_only) = 0;
///
// Returns true if the text is read-only.
///
/*--cef()--*/
virtual bool IsReadOnly() =0;
virtual bool IsReadOnly() = 0;
///
// Returns the currently displayed text.
///
/*--cef()--*/
virtual CefString GetText() =0;
virtual CefString GetText() = 0;
///
// Sets the contents to |text|. The cursor will be moved to end of the text if
// the current position is outside of the text range.
///
/*--cef()--*/
virtual void SetText(const CefString& text) =0;
virtual void SetText(const CefString& text) = 0;
///
// Appends |text| to the previously-existing text.
///
/*--cef()--*/
virtual void AppendText(const CefString& text) =0;
virtual void AppendText(const CefString& text) = 0;
///
// Inserts |text| at the current cursor position replacing any selected text.
///
/*--cef()--*/
virtual void InsertOrReplaceText(const CefString& text) =0;
virtual void InsertOrReplaceText(const CefString& text) = 0;
///
// Returns true if there is any selected text.
///
/*--cef()--*/
virtual bool HasSelection() =0;
virtual bool HasSelection() = 0;
///
// Returns the currently selected text.
///
/*--cef()--*/
virtual CefString GetSelectedText() =0;
virtual CefString GetSelectedText() = 0;
///
// Selects all text. If |reversed| is true the range will end at the logical
@@ -123,67 +123,67 @@ class CefTextfield : public CefView {
// that overflows its display area.
///
/*--cef()--*/
virtual void SelectAll(bool reversed) =0;
virtual void SelectAll(bool reversed) = 0;
///
// Clears the text selection and sets the caret to the end.
///
/*--cef()--*/
virtual void ClearSelection() =0;
virtual void ClearSelection() = 0;
///
// Returns the selected logical text range.
///
/*--cef()--*/
virtual CefRange GetSelectedRange() =0;
virtual CefRange GetSelectedRange() = 0;
///
// Selects the specified logical text range.
///
/*--cef()--*/
virtual void SelectRange(const CefRange& range) =0;
virtual void SelectRange(const CefRange& range) = 0;
///
// Returns the current cursor position.
///
/*--cef()--*/
virtual size_t GetCursorPosition() =0;
virtual size_t GetCursorPosition() = 0;
///
// Sets the text color.
///
/*--cef()--*/
virtual void SetTextColor(cef_color_t color) =0;
virtual void SetTextColor(cef_color_t color) = 0;
///
// Returns the text color.
///
/*--cef()--*/
virtual cef_color_t GetTextColor() =0;
virtual cef_color_t GetTextColor() = 0;
///
// Sets the selection text color.
///
/*--cef()--*/
virtual void SetSelectionTextColor(cef_color_t color) =0;
virtual void SetSelectionTextColor(cef_color_t color) = 0;
///
// Returns the selection text color.
///
/*--cef()--*/
virtual cef_color_t GetSelectionTextColor() =0;
virtual cef_color_t GetSelectionTextColor() = 0;
///
// Sets the selection background color.
///
/*--cef()--*/
virtual void SetSelectionBackgroundColor(cef_color_t color) =0;
virtual void SetSelectionBackgroundColor(cef_color_t color) = 0;
///
// Returns the selection background color.
///
/*--cef()--*/
virtual cef_color_t GetSelectionBackgroundColor() =0;
virtual cef_color_t GetSelectionBackgroundColor() = 0;
///
// Sets the font list. The format is "<FONT_FAMILY_LIST>,[STYLES] <SIZE>",
@@ -198,7 +198,7 @@ class CefTextfield : public CefView {
// - "Arial, 14px"
///
/*--cef()--*/
virtual void SetFontList(const CefString& font_list) =0;
virtual void SetFontList(const CefString& font_list) = 0;
///
// Applies |color| to the specified |range| without changing the default
@@ -206,8 +206,7 @@ class CefTextfield : public CefView {
// contents.
///
/*--cef()--*/
virtual void ApplyTextColor(cef_color_t color,
const CefRange& range) =0;
virtual void ApplyTextColor(cef_color_t color, const CefRange& range) = 0;
///
// Applies |style| to the specified |range| without changing the default
@@ -218,14 +217,14 @@ class CefTextfield : public CefView {
/*--cef()--*/
virtual void ApplyTextStyle(cef_text_style_t style,
bool add,
const CefRange& range) =0;
const CefRange& range) = 0;
///
// Returns true if the action associated with the specified command id is
// enabled. See additional comments on ExecuteCommand().
///
/*--cef()--*/
virtual bool IsCommandEnabled(int command_id) =0;
virtual bool IsCommandEnabled(int command_id) = 0;
///
// Performs the action associated with the specified command id. Valid values
@@ -234,39 +233,39 @@ class CefTextfield : public CefView {
// IDS_MOVE_*. See include/cef_pack_strings.h for definitions.
///
/*--cef()--*/
virtual void ExecuteCommand(int command_id) =0;
virtual void ExecuteCommand(int command_id) = 0;
///
// Clears Edit history.
///
/*--cef()--*/
virtual void ClearEditHistory() =0;
virtual void ClearEditHistory() = 0;
///
// Sets the placeholder text that will be displayed when the Textfield is
// empty.
///
/*--cef()--*/
virtual void SetPlaceholderText(const CefString& text) =0;
virtual void SetPlaceholderText(const CefString& text) = 0;
///
// Returns the placeholder text that will be displayed when the Textfield is
// empty.
///
/*--cef()--*/
virtual CefString GetPlaceholderText() =0;
virtual CefString GetPlaceholderText() = 0;
///
// Sets the placeholder text color.
///
/*--cef()--*/
virtual void SetPlaceholderTextColor(cef_color_t color) =0;
virtual void SetPlaceholderTextColor(cef_color_t color) = 0;
///
// Set the accessible name that will be exposed to assistive technology (AT).
///
/*--cef()--*/
virtual void SetAccessibleName(const CefString& name) =0;
virtual void SetAccessibleName(const CefString& name) = 0;
};
#endif // CEF_INCLUDE_VIEWS_CEF_TEXTFIELD_H_

View File

@@ -57,7 +57,9 @@ class CefTextfieldDelegate : public CefViewDelegate {
///
/*--cef()--*/
virtual bool OnKeyEvent(CefRefPtr<CefTextfield> textfield,
const CefKeyEvent& event) { return false; }
const CefKeyEvent& event) {
return false;
}
///
// Called after performing a user action that may change |textfield|.

View File

@@ -60,38 +60,38 @@ class CefView : public CefBaseRefCounted {
// Returns this View as a BrowserView or NULL if this is not a BrowserView.
///
/*--cef()--*/
virtual CefRefPtr<CefBrowserView> AsBrowserView() =0;
virtual CefRefPtr<CefBrowserView> AsBrowserView() = 0;
///
// Returns this View as a Button or NULL if this is not a Button.
///
/*--cef()--*/
virtual CefRefPtr<CefButton> AsButton() =0;
virtual CefRefPtr<CefButton> AsButton() = 0;
///
// Returns this View as a Panel or NULL if this is not a Panel.
///
/*--cef()--*/
virtual CefRefPtr<CefPanel> AsPanel() =0;
virtual CefRefPtr<CefPanel> AsPanel() = 0;
///
// Returns this View as a ScrollView or NULL if this is not a ScrollView.
///
/*--cef()--*/
virtual CefRefPtr<CefScrollView> AsScrollView() =0;
virtual CefRefPtr<CefScrollView> AsScrollView() = 0;
///
// Returns this View as a Textfield or NULL if this is not a Textfield.
///
/*--cef()--*/
virtual CefRefPtr<CefTextfield> AsTextfield() =0;
virtual CefRefPtr<CefTextfield> AsTextfield() = 0;
///
// Returns the type of this View as a string. Used primarily for testing
// purposes.
///
/*--cef()--*/
virtual CefString GetTypeString() =0;
virtual CefString GetTypeString() = 0;
///
// Returns a string representation of this View which includes the type and
@@ -99,57 +99,57 @@ class CefView : public CefBaseRefCounted {
// any child Views will also be included. Used primarily for testing purposes.
///
/*--cef()--*/
virtual CefString ToString(bool include_children) =0;
virtual CefString ToString(bool include_children) = 0;
///
// Returns true if this View is valid.
///
/*--cef()--*/
virtual bool IsValid() =0;
virtual bool IsValid() = 0;
///
// Returns true if this View is currently attached to another View. A View can
// only be attached to one View at a time.
///
/*--cef()--*/
virtual bool IsAttached() =0;
virtual bool IsAttached() = 0;
///
// Returns true if this View is the same as |that| View.
///
/*--cef()--*/
virtual bool IsSame(CefRefPtr<CefView> that) =0;
virtual bool IsSame(CefRefPtr<CefView> that) = 0;
///
// Returns the delegate associated with this View, if any.
///
/*--cef()--*/
virtual CefRefPtr<CefViewDelegate> GetDelegate() =0;
virtual CefRefPtr<CefViewDelegate> GetDelegate() = 0;
///
// Returns the top-level Window hosting this View, if any.
///
/*--cef()--*/
virtual CefRefPtr<CefWindow> GetWindow() =0;
virtual CefRefPtr<CefWindow> GetWindow() = 0;
///
// Returns the ID for this View.
///
/*--cef()--*/
virtual int GetID() =0;
virtual int GetID() = 0;
///
// Sets the ID for this View. ID should be unique within the subtree that you
// intend to search for it. 0 is the default ID for views.
///
/*--cef()--*/
virtual void SetID(int id) =0;
virtual void SetID(int id) = 0;
///
// Returns the group id of this View, or -1 if not set.
///
/*--cef()--*/
virtual int GetGroupID() =0;
virtual int GetGroupID() = 0;
///
// A group id is used to tag Views which are part of the same logical group.
@@ -157,13 +157,13 @@ class CefView : public CefBaseRefCounted {
// The group id is immutable once it's set.
///
/*--cef()--*/
virtual void SetGroupID(int group_id) =0;
virtual void SetGroupID(int group_id) = 0;
///
// Returns the View that contains this View, if any.
///
/*--cef()--*/
virtual CefRefPtr<CefView> GetParentView() =0;
virtual CefRefPtr<CefView> GetParentView() = 0;
///
// Recursively descends the view tree starting at this View, and returns the
@@ -171,83 +171,83 @@ class CefView : public CefBaseRefCounted {
// matching child view is found.
///
/*--cef()--*/
virtual CefRefPtr<CefView> GetViewForID(int id) =0;
virtual CefRefPtr<CefView> GetViewForID(int id) = 0;
///
// Sets the bounds (size and position) of this View. Position is in parent
// coordinates.
///
/*--cef()--*/
virtual void SetBounds(const CefRect& bounds) =0;
virtual void SetBounds(const CefRect& bounds) = 0;
///
// Returns the bounds (size and position) of this View. Position is in parent
// coordinates.
///
/*--cef()--*/
virtual CefRect GetBounds() =0;
virtual CefRect GetBounds() = 0;
///
// Returns the bounds (size and position) of this View. Position is in screen
// coordinates.
///
/*--cef()--*/
virtual CefRect GetBoundsInScreen() =0;
virtual CefRect GetBoundsInScreen() = 0;
///
// Sets the size of this View without changing the position.
///
/*--cef()--*/
virtual void SetSize(const CefSize& size) =0;
virtual void SetSize(const CefSize& size) = 0;
///
// Returns the size of this View.
///
/*--cef()--*/
virtual CefSize GetSize() =0;
virtual CefSize GetSize() = 0;
///
// Sets the position of this View without changing the size. |position| is in
// parent coordinates.
///
/*--cef()--*/
virtual void SetPosition(const CefPoint& position) =0;
virtual void SetPosition(const CefPoint& position) = 0;
///
// Returns the position of this View. Position is in parent coordinates.
///
/*--cef()--*/
virtual CefPoint GetPosition() =0;
virtual CefPoint GetPosition() = 0;
///
// Returns the size this View would like to be if enough space is available.
///
/*--cef()--*/
virtual CefSize GetPreferredSize() =0;
virtual CefSize GetPreferredSize() = 0;
///
// Size this View to its preferred size.
///
/*--cef()--*/
virtual void SizeToPreferredSize() =0;
virtual void SizeToPreferredSize() = 0;
///
// Returns the minimum size for this View.
///
/*--cef()--*/
virtual CefSize GetMinimumSize() =0;
virtual CefSize GetMinimumSize() = 0;
///
// Returns the maximum size for this View.
///
/*--cef()--*/
virtual CefSize GetMaximumSize() =0;
virtual CefSize GetMaximumSize() = 0;
///
// Returns the height necessary to display this View with the provided width.
///
/*--cef()--*/
virtual int GetHeightForWidth(int width) =0;
virtual int GetHeightForWidth(int width) = 0;
///
// Indicate that this View and all parent Views require a re-layout. This
@@ -255,7 +255,7 @@ class CefView : public CefBaseRefCounted {
// bounds of parent Views do not change.
///
/*--cef()--*/
virtual void InvalidateLayout() =0;
virtual void InvalidateLayout() = 0;
///
// Sets whether this View is visible. Windows are hidden by default and other
@@ -267,7 +267,7 @@ class CefView : public CefBaseRefCounted {
// equivalent to calling the Window Show() and Hide() methods.
///
/*--cef()--*/
virtual void SetVisible(bool visible) =0;
virtual void SetVisible(bool visible) = 0;
///
// Returns whether this View is visible. A view may be visible but still not
@@ -278,7 +278,7 @@ class CefView : public CefBaseRefCounted {
// drawn.
///
/*--cef()--*/
virtual bool IsVisible() =0;
virtual bool IsVisible() = 0;
///
// Returns whether this View is visible and drawn in a Window. A view is drawn
@@ -288,7 +288,7 @@ class CefView : public CefBaseRefCounted {
// IsVisible() on the Window.
///
/*--cef()--*/
virtual bool IsDrawn() =0;
virtual bool IsDrawn() = 0;
///
// Set whether this View is enabled. A disabled View does not receive keyboard
@@ -296,13 +296,13 @@ class CefView : public CefBaseRefCounted {
// be repainted. Also, clears focus if the focused View is disabled.
///
/*--cef()--*/
virtual void SetEnabled(bool enabled) =0;
virtual void SetEnabled(bool enabled) = 0;
///
// Returns whether this View is enabled.
///
/*--cef()--*/
virtual bool IsEnabled() =0;
virtual bool IsEnabled() = 0;
///
// Sets whether this View is capable of taking focus. It will clear focus if
@@ -310,39 +310,39 @@ class CefView : public CefBaseRefCounted {
// that a View used as a container does not get the focus.
///
/*--cef()--*/
virtual void SetFocusable(bool focusable) =0;
virtual void SetFocusable(bool focusable) = 0;
///
// Returns true if this View is focusable, enabled and drawn.
///
/*--cef()--*/
virtual bool IsFocusable() =0;
virtual bool IsFocusable() = 0;
///
// Return whether this View is focusable when the user requires full keyboard
// access, even though it may not be normally focusable.
///
/*--cef()--*/
virtual bool IsAccessibilityFocusable() =0;
virtual bool IsAccessibilityFocusable() = 0;
///
// Request keyboard focus. If this View is focusable it will become the
// focused View.
///
/*--cef()--*/
virtual void RequestFocus() =0;
virtual void RequestFocus() = 0;
///
// Sets the background color for this View.
///
/*--cef()--*/
virtual void SetBackgroundColor(cef_color_t color) =0;
virtual void SetBackgroundColor(cef_color_t color) = 0;
///
// Returns the background color for this View.
///
/*--cef()--*/
virtual cef_color_t GetBackgroundColor() =0;
virtual cef_color_t GetBackgroundColor() = 0;
///
// Convert |point| from this View's coordinate system to that of the screen.
@@ -352,7 +352,7 @@ class CefView : public CefBaseRefCounted {
// conversion to display-specific pixel coordinates is desired.
///
/*--cef()--*/
virtual bool ConvertPointToScreen(CefPoint& point) =0;
virtual bool ConvertPointToScreen(CefPoint& point) = 0;
///
// Convert |point| to this View's coordinate system from that of the screen.
@@ -362,7 +362,7 @@ class CefView : public CefBaseRefCounted {
// conversion from display-specific pixel coordinates is necessary.
///
/*--cef()--*/
virtual bool ConvertPointFromScreen(CefPoint& point) =0;
virtual bool ConvertPointFromScreen(CefPoint& point) = 0;
///
// Convert |point| from this View's coordinate system to that of the Window.
@@ -370,7 +370,7 @@ class CefView : public CefBaseRefCounted {
// the conversion is successful or false otherwise.
///
/*--cef()--*/
virtual bool ConvertPointToWindow(CefPoint& point) =0;
virtual bool ConvertPointToWindow(CefPoint& point) = 0;
///
// Convert |point| to this View's coordinate system from that of the Window.
@@ -378,7 +378,7 @@ class CefView : public CefBaseRefCounted {
// the conversion is successful or false otherwise.
///
/*--cef()--*/
virtual bool ConvertPointFromWindow(CefPoint& point) =0;
virtual bool ConvertPointFromWindow(CefPoint& point) = 0;
///
// Convert |point| from this View's coordinate system to that of |view|.
@@ -386,8 +386,7 @@ class CefView : public CefBaseRefCounted {
// hierarchy. Returns true if the conversion is successful or false otherwise.
///
/*--cef()--*/
virtual bool ConvertPointToView(CefRefPtr<CefView> view,
CefPoint& point) =0;
virtual bool ConvertPointToView(CefRefPtr<CefView> view, CefPoint& point) = 0;
///
// Convert |point| to this View's coordinate system from that |view|. |view|
@@ -396,7 +395,7 @@ class CefView : public CefBaseRefCounted {
///
/*--cef()--*/
virtual bool ConvertPointFromView(CefRefPtr<CefView> view,
CefPoint& point) =0;
CefPoint& point) = 0;
};
#endif // CEF_INCLUDE_VIEWS_CEF_VIEW_H_

View File

@@ -62,17 +62,13 @@ class CefViewDelegate : public virtual CefBaseRefCounted {
// Return the minimum size for |view|.
///
/*--cef()--*/
virtual CefSize GetMinimumSize(CefRefPtr<CefView> view) {
return CefSize();
}
virtual CefSize GetMinimumSize(CefRefPtr<CefView> view) { return CefSize(); }
///
// Return the maximum size for |view|.
///
/*--cef()--*/
virtual CefSize GetMaximumSize(CefRefPtr<CefView> view) {
return CefSize();
}
virtual CefSize GetMaximumSize(CefRefPtr<CefView> view) { return CefSize(); }
///
// Return the height necessary to display |view| with the provided |width|.

View File

@@ -65,136 +65,136 @@ class CefWindow : public CefPanel {
// Show the Window.
///
/*--cef()--*/
virtual void Show() =0;
virtual void Show() = 0;
///
// Hide the Window.
///
/*--cef()--*/
virtual void Hide() =0;
virtual void Hide() = 0;
///
// Sizes the Window to |size| and centers it in the current display.
///
/*--cef()--*/
virtual void CenterWindow(const CefSize& size) =0;
virtual void CenterWindow(const CefSize& size) = 0;
///
// Close the Window.
///
/*--cef()--*/
virtual void Close() =0;
virtual void Close() = 0;
///
// Returns true if the Window has been closed.
///
/*--cef()--*/
virtual bool IsClosed() =0;
virtual bool IsClosed() = 0;
///
// Activate the Window, assuming it already exists and is visible.
///
/*--cef()--*/
virtual void Activate() =0;
virtual void Activate() = 0;
///
// Deactivate the Window, making the next Window in the Z order the active
// Window.
///
/*--cef()--*/
virtual void Deactivate() =0;
virtual void Deactivate() = 0;
///
// Returns whether the Window is the currently active Window.
///
/*--cef()--*/
virtual bool IsActive() =0;
virtual bool IsActive() = 0;
///
// Bring this Window to the top of other Windows in the Windowing system.
///
/*--cef()--*/
virtual void BringToTop() =0;
virtual void BringToTop() = 0;
///
// Set the Window to be on top of other Windows in the Windowing system.
///
/*--cef()--*/
virtual void SetAlwaysOnTop(bool on_top) =0;
virtual void SetAlwaysOnTop(bool on_top) = 0;
///
// Returns whether the Window has been set to be on top of other Windows in
// the Windowing system.
///
/*--cef()--*/
virtual bool IsAlwaysOnTop() =0;
virtual bool IsAlwaysOnTop() = 0;
///
// Maximize the Window.
///
/*--cef()--*/
virtual void Maximize() =0;
virtual void Maximize() = 0;
///
// Minimize the Window.
///
/*--cef()--*/
virtual void Minimize() =0;
virtual void Minimize() = 0;
///
// Restore the Window.
///
/*--cef()--*/
virtual void Restore() =0;
virtual void Restore() = 0;
///
// Set fullscreen Window state.
///
/*--cef()--*/
virtual void SetFullscreen(bool fullscreen) =0;
virtual void SetFullscreen(bool fullscreen) = 0;
///
// Returns true if the Window is maximized.
///
/*--cef()--*/
virtual bool IsMaximized() =0;
virtual bool IsMaximized() = 0;
///
// Returns true if the Window is minimized.
///
/*--cef()--*/
virtual bool IsMinimized() =0;
virtual bool IsMinimized() = 0;
///
// Returns true if the Window is fullscreen.
///
/*--cef()--*/
virtual bool IsFullscreen() =0;
virtual bool IsFullscreen() = 0;
///
// Set the Window title.
///
/*--cef(optional_param=title)--*/
virtual void SetTitle(const CefString& title) =0;
virtual void SetTitle(const CefString& title) = 0;
///
// Get the Window title.
///
/*--cef()--*/
virtual CefString GetTitle() =0;
virtual CefString GetTitle() = 0;
///
// Set the Window icon. This should be a 16x16 icon suitable for use in the
// Windows's title bar.
///
/*--cef()--*/
virtual void SetWindowIcon(CefRefPtr<CefImage> image) =0;
virtual void SetWindowIcon(CefRefPtr<CefImage> image) = 0;
///
// Get the Window icon.
///
/*--cef()--*/
virtual CefRefPtr<CefImage> GetWindowIcon() =0;
virtual CefRefPtr<CefImage> GetWindowIcon() = 0;
///
// Set the Window App icon. This should be a larger icon for use in the host
@@ -203,13 +203,13 @@ class CefWindow : public CefPanel {
// if no Window App icon is specified.
///
/*--cef()--*/
virtual void SetWindowAppIcon(CefRefPtr<CefImage> image) =0;
virtual void SetWindowAppIcon(CefRefPtr<CefImage> image) = 0;
///
// Get the Window App icon.
///
/*--cef()--*/
virtual CefRefPtr<CefImage> GetWindowAppIcon() =0;
virtual CefRefPtr<CefImage> GetWindowAppIcon() = 0;
///
// Show a menu with contents |menu_model|. |screen_point| specifies the menu
@@ -219,27 +219,27 @@ class CefWindow : public CefPanel {
/*--cef()--*/
virtual void ShowMenu(CefRefPtr<CefMenuModel> menu_model,
const CefPoint& screen_point,
cef_menu_anchor_position_t anchor_position) =0;
cef_menu_anchor_position_t anchor_position) = 0;
///
// Cancel the menu that is currently showing, if any.
///
/*--cef()--*/
virtual void CancelMenu() =0;
virtual void CancelMenu() = 0;
///
// Returns the Display that most closely intersects the bounds of this Window.
// May return NULL if this Window is not currently displayed.
///
/*--cef()--*/
virtual CefRefPtr<CefDisplay> GetDisplay() =0;
virtual CefRefPtr<CefDisplay> GetDisplay() = 0;
///
// Returns the bounds (size and position) of this Window's client area.
// Position is in screen coordinates.
///
/*--cef()--*/
virtual CefRect GetClientAreaBoundsInScreen() =0;
virtual CefRect GetClientAreaBoundsInScreen() = 0;
///
// Set the regions where mouse events will be intercepted by this Window to
@@ -249,13 +249,13 @@ class CefWindow : public CefPanel {
///
/*--cef(optional_param=regions)--*/
virtual void SetDraggableRegions(
const std::vector<CefDraggableRegion>& regions) =0;
const std::vector<CefDraggableRegion>& regions) = 0;
///
// Retrieve the platform window handle for this Window.
///
/*--cef()--*/
virtual CefWindowHandle GetWindowHandle() =0;
virtual CefWindowHandle GetWindowHandle() = 0;
///
// Simulate a key press. |key_code| is the VKEY_* value from Chromium's
@@ -265,8 +265,7 @@ class CefWindow : public CefPanel {
// primarily for testing purposes.
///
/*--cef()--*/
virtual void SendKeyPress(int key_code,
uint32 event_flags) =0;
virtual void SendKeyPress(int key_code, uint32 event_flags) = 0;
///
// Simulate a mouse move. The mouse cursor will be moved to the specified
@@ -274,7 +273,7 @@ class CefWindow : public CefPanel {
// purposes.
///
/*--cef()--*/
virtual void SendMouseMove(int screen_x, int screen_y) =0;
virtual void SendMouseMove(int screen_x, int screen_y) = 0;
///
// Simulate mouse down and/or mouse up events. |button| is the mouse button
@@ -288,7 +287,7 @@ class CefWindow : public CefPanel {
/*--cef()--*/
virtual void SendMouseEvents(cef_mouse_button_type_t button,
bool mouse_down,
bool mouse_up) =0;
bool mouse_up) = 0;
///
// Set the keyboard accelerator for the specified |command_id|. |key_code| can
// be any virtual key or character value. CefWindowDelegate::OnAccelerator
@@ -300,19 +299,19 @@ class CefWindow : public CefPanel {
int key_code,
bool shift_pressed,
bool ctrl_pressed,
bool alt_pressed) =0;
bool alt_pressed) = 0;
///
// Remove the keyboard accelerator for the specified |command_id|.
///
/*--cef()--*/
virtual void RemoveAccelerator(int command_id) =0;
virtual void RemoveAccelerator(int command_id) = 0;
///
// Remove all keyboard accelerators.
///
/*--cef()--*/
virtual void RemoveAllAccelerators() =0;
virtual void RemoveAllAccelerators() = 0;
};
#endif // CEF_INCLUDE_VIEWS_CEF_WINDOW_H_

View File

@@ -102,8 +102,9 @@ class CefWindowDelegate : public CefPanelDelegate {
// handled or false otherwise.
///
/*--cef()--*/
virtual bool OnAccelerator(CefRefPtr<CefWindow> window,
int command_id) { return false; }
virtual bool OnAccelerator(CefRefPtr<CefWindow> window, int command_id) {
return false;
}
///
// Called after all other controls in the window have had a chance to
@@ -112,8 +113,9 @@ class CefWindowDelegate : public CefPanelDelegate {
///
/*--cef()--*/
virtual bool OnKeyEvent(CefRefPtr<CefWindow> window,
const CefKeyEvent& event) { return false; }
const CefKeyEvent& event) {
return false;
}
};
#endif // CEF_INCLUDE_VIEWS_CEF_WINDOW_DELEGATE_H_