refactor: make NativeWindow getter methods const (#40804)
* refactor: make NativeWindow getter methods const * fixup! refactor: make NativeWindow getter methods const make GetZOrderLevel() const * fixup! refactor: make NativeWindow getter methods const fix oops
This commit is contained in:
parent
3a06047e61
commit
f229201f41
8 changed files with 238 additions and 238 deletions
|
@ -332,7 +332,7 @@ void BaseWindow::Blur() {
|
||||||
window_->Focus(false);
|
window_->Focus(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BaseWindow::IsFocused() {
|
bool BaseWindow::IsFocused() const {
|
||||||
return window_->IsFocused();
|
return window_->IsFocused();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -351,11 +351,11 @@ void BaseWindow::Hide() {
|
||||||
window_->Hide();
|
window_->Hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BaseWindow::IsVisible() {
|
bool BaseWindow::IsVisible() const {
|
||||||
return window_->IsVisible();
|
return window_->IsVisible();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BaseWindow::IsEnabled() {
|
bool BaseWindow::IsEnabled() const {
|
||||||
return window_->IsEnabled();
|
return window_->IsEnabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -371,7 +371,7 @@ void BaseWindow::Unmaximize() {
|
||||||
window_->Unmaximize();
|
window_->Unmaximize();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BaseWindow::IsMaximized() {
|
bool BaseWindow::IsMaximized() const {
|
||||||
return window_->IsMaximized();
|
return window_->IsMaximized();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -383,7 +383,7 @@ void BaseWindow::Restore() {
|
||||||
window_->Restore();
|
window_->Restore();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BaseWindow::IsMinimized() {
|
bool BaseWindow::IsMinimized() const {
|
||||||
return window_->IsMinimized();
|
return window_->IsMinimized();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -391,7 +391,7 @@ void BaseWindow::SetFullScreen(bool fullscreen) {
|
||||||
window_->SetFullScreen(fullscreen);
|
window_->SetFullScreen(fullscreen);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BaseWindow::IsFullscreen() {
|
bool BaseWindow::IsFullscreen() const {
|
||||||
return window_->IsFullscreen();
|
return window_->IsFullscreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -402,15 +402,15 @@ void BaseWindow::SetBounds(const gfx::Rect& bounds,
|
||||||
window_->SetBounds(bounds, animate);
|
window_->SetBounds(bounds, animate);
|
||||||
}
|
}
|
||||||
|
|
||||||
gfx::Rect BaseWindow::GetBounds() {
|
gfx::Rect BaseWindow::GetBounds() const {
|
||||||
return window_->GetBounds();
|
return window_->GetBounds();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BaseWindow::IsNormal() {
|
bool BaseWindow::IsNormal() const {
|
||||||
return window_->IsNormal();
|
return window_->IsNormal();
|
||||||
}
|
}
|
||||||
|
|
||||||
gfx::Rect BaseWindow::GetNormalBounds() {
|
gfx::Rect BaseWindow::GetNormalBounds() const {
|
||||||
return window_->GetNormalBounds();
|
return window_->GetNormalBounds();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -421,7 +421,7 @@ void BaseWindow::SetContentBounds(const gfx::Rect& bounds,
|
||||||
window_->SetContentBounds(bounds, animate);
|
window_->SetContentBounds(bounds, animate);
|
||||||
}
|
}
|
||||||
|
|
||||||
gfx::Rect BaseWindow::GetContentBounds() {
|
gfx::Rect BaseWindow::GetContentBounds() const {
|
||||||
return window_->GetContentBounds();
|
return window_->GetContentBounds();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -433,7 +433,7 @@ void BaseWindow::SetSize(int width, int height, gin_helper::Arguments* args) {
|
||||||
window_->SetSize(size, animate);
|
window_->SetSize(size, animate);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<int> BaseWindow::GetSize() {
|
std::vector<int> BaseWindow::GetSize() const {
|
||||||
std::vector<int> result(2);
|
std::vector<int> result(2);
|
||||||
gfx::Size size = window_->GetSize();
|
gfx::Size size = window_->GetSize();
|
||||||
result[0] = size.width();
|
result[0] = size.width();
|
||||||
|
@ -449,7 +449,7 @@ void BaseWindow::SetContentSize(int width,
|
||||||
window_->SetContentSize(gfx::Size(width, height), animate);
|
window_->SetContentSize(gfx::Size(width, height), animate);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<int> BaseWindow::GetContentSize() {
|
std::vector<int> BaseWindow::GetContentSize() const {
|
||||||
std::vector<int> result(2);
|
std::vector<int> result(2);
|
||||||
gfx::Size size = window_->GetContentSize();
|
gfx::Size size = window_->GetContentSize();
|
||||||
result[0] = size.width();
|
result[0] = size.width();
|
||||||
|
@ -461,7 +461,7 @@ void BaseWindow::SetMinimumSize(int width, int height) {
|
||||||
window_->SetMinimumSize(gfx::Size(width, height));
|
window_->SetMinimumSize(gfx::Size(width, height));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<int> BaseWindow::GetMinimumSize() {
|
std::vector<int> BaseWindow::GetMinimumSize() const {
|
||||||
std::vector<int> result(2);
|
std::vector<int> result(2);
|
||||||
gfx::Size size = window_->GetMinimumSize();
|
gfx::Size size = window_->GetMinimumSize();
|
||||||
result[0] = size.width();
|
result[0] = size.width();
|
||||||
|
@ -473,7 +473,7 @@ void BaseWindow::SetMaximumSize(int width, int height) {
|
||||||
window_->SetMaximumSize(gfx::Size(width, height));
|
window_->SetMaximumSize(gfx::Size(width, height));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<int> BaseWindow::GetMaximumSize() {
|
std::vector<int> BaseWindow::GetMaximumSize() const {
|
||||||
std::vector<int> result(2);
|
std::vector<int> result(2);
|
||||||
gfx::Size size = window_->GetMaximumSize();
|
gfx::Size size = window_->GetMaximumSize();
|
||||||
result[0] = size.width();
|
result[0] = size.width();
|
||||||
|
@ -491,7 +491,7 @@ void BaseWindow::SetResizable(bool resizable) {
|
||||||
window_->SetResizable(resizable);
|
window_->SetResizable(resizable);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BaseWindow::IsResizable() {
|
bool BaseWindow::IsResizable() const {
|
||||||
return window_->IsResizable();
|
return window_->IsResizable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -499,7 +499,7 @@ void BaseWindow::SetMovable(bool movable) {
|
||||||
window_->SetMovable(movable);
|
window_->SetMovable(movable);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BaseWindow::IsMovable() {
|
bool BaseWindow::IsMovable() const {
|
||||||
return window_->IsMovable();
|
return window_->IsMovable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -507,7 +507,7 @@ void BaseWindow::SetMinimizable(bool minimizable) {
|
||||||
window_->SetMinimizable(minimizable);
|
window_->SetMinimizable(minimizable);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BaseWindow::IsMinimizable() {
|
bool BaseWindow::IsMinimizable() const {
|
||||||
return window_->IsMinimizable();
|
return window_->IsMinimizable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -515,7 +515,7 @@ void BaseWindow::SetMaximizable(bool maximizable) {
|
||||||
window_->SetMaximizable(maximizable);
|
window_->SetMaximizable(maximizable);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BaseWindow::IsMaximizable() {
|
bool BaseWindow::IsMaximizable() const {
|
||||||
return window_->IsMaximizable();
|
return window_->IsMaximizable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -523,7 +523,7 @@ void BaseWindow::SetFullScreenable(bool fullscreenable) {
|
||||||
window_->SetFullScreenable(fullscreenable);
|
window_->SetFullScreenable(fullscreenable);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BaseWindow::IsFullScreenable() {
|
bool BaseWindow::IsFullScreenable() const {
|
||||||
return window_->IsFullScreenable();
|
return window_->IsFullScreenable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -531,7 +531,7 @@ void BaseWindow::SetClosable(bool closable) {
|
||||||
window_->SetClosable(closable);
|
window_->SetClosable(closable);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BaseWindow::IsClosable() {
|
bool BaseWindow::IsClosable() const {
|
||||||
return window_->IsClosable();
|
return window_->IsClosable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -546,7 +546,7 @@ void BaseWindow::SetAlwaysOnTop(bool top, gin_helper::Arguments* args) {
|
||||||
window_->SetAlwaysOnTop(z_order, level, relative_level);
|
window_->SetAlwaysOnTop(z_order, level, relative_level);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BaseWindow::IsAlwaysOnTop() {
|
bool BaseWindow::IsAlwaysOnTop() const {
|
||||||
return window_->GetZOrderLevel() != ui::ZOrderLevel::kNormal;
|
return window_->GetZOrderLevel() != ui::ZOrderLevel::kNormal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -560,7 +560,7 @@ void BaseWindow::SetPosition(int x, int y, gin_helper::Arguments* args) {
|
||||||
window_->SetPosition(gfx::Point(x, y), animate);
|
window_->SetPosition(gfx::Point(x, y), animate);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<int> BaseWindow::GetPosition() {
|
std::vector<int> BaseWindow::GetPosition() const {
|
||||||
std::vector<int> result(2);
|
std::vector<int> result(2);
|
||||||
gfx::Point pos = window_->GetPosition();
|
gfx::Point pos = window_->GetPosition();
|
||||||
result[0] = pos.x();
|
result[0] = pos.x();
|
||||||
|
@ -581,7 +581,7 @@ void BaseWindow::SetTitle(const std::string& title) {
|
||||||
window_->SetTitle(title);
|
window_->SetTitle(title);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string BaseWindow::GetTitle() {
|
std::string BaseWindow::GetTitle() const {
|
||||||
return window_->GetTitle();
|
return window_->GetTitle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -589,7 +589,7 @@ void BaseWindow::SetAccessibleTitle(const std::string& title) {
|
||||||
window_->SetAccessibleTitle(title);
|
window_->SetAccessibleTitle(title);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string BaseWindow::GetAccessibleTitle() {
|
std::string BaseWindow::GetAccessibleTitle() const {
|
||||||
return window_->GetAccessibleTitle();
|
return window_->GetAccessibleTitle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -605,7 +605,7 @@ void BaseWindow::SetExcludedFromShownWindowsMenu(bool excluded) {
|
||||||
window_->SetExcludedFromShownWindowsMenu(excluded);
|
window_->SetExcludedFromShownWindowsMenu(excluded);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BaseWindow::IsExcludedFromShownWindowsMenu() {
|
bool BaseWindow::IsExcludedFromShownWindowsMenu() const {
|
||||||
return window_->IsExcludedFromShownWindowsMenu();
|
return window_->IsExcludedFromShownWindowsMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -613,7 +613,7 @@ void BaseWindow::SetSimpleFullScreen(bool simple_fullscreen) {
|
||||||
window_->SetSimpleFullScreen(simple_fullscreen);
|
window_->SetSimpleFullScreen(simple_fullscreen);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BaseWindow::IsSimpleFullScreen() {
|
bool BaseWindow::IsSimpleFullScreen() const {
|
||||||
return window_->IsSimpleFullScreen();
|
return window_->IsSimpleFullScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -621,7 +621,7 @@ void BaseWindow::SetKiosk(bool kiosk) {
|
||||||
window_->SetKiosk(kiosk);
|
window_->SetKiosk(kiosk);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BaseWindow::IsKiosk() {
|
bool BaseWindow::IsKiosk() const {
|
||||||
return window_->IsKiosk();
|
return window_->IsKiosk();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -634,7 +634,7 @@ void BaseWindow::SetBackgroundColor(const std::string& color_name) {
|
||||||
window_->SetBackgroundColor(color);
|
window_->SetBackgroundColor(color);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string BaseWindow::GetBackgroundColor(gin_helper::Arguments* args) {
|
std::string BaseWindow::GetBackgroundColor(gin_helper::Arguments* args) const {
|
||||||
return ToRGBHex(window_->GetBackgroundColor());
|
return ToRGBHex(window_->GetBackgroundColor());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -646,7 +646,7 @@ void BaseWindow::SetHasShadow(bool has_shadow) {
|
||||||
window_->SetHasShadow(has_shadow);
|
window_->SetHasShadow(has_shadow);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BaseWindow::HasShadow() {
|
bool BaseWindow::HasShadow() const {
|
||||||
return window_->HasShadow();
|
return window_->HasShadow();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -654,7 +654,7 @@ void BaseWindow::SetOpacity(const double opacity) {
|
||||||
window_->SetOpacity(opacity);
|
window_->SetOpacity(opacity);
|
||||||
}
|
}
|
||||||
|
|
||||||
double BaseWindow::GetOpacity() {
|
double BaseWindow::GetOpacity() const {
|
||||||
return window_->GetOpacity();
|
return window_->GetOpacity();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -666,7 +666,7 @@ void BaseWindow::SetRepresentedFilename(const std::string& filename) {
|
||||||
window_->SetRepresentedFilename(filename);
|
window_->SetRepresentedFilename(filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string BaseWindow::GetRepresentedFilename() {
|
std::string BaseWindow::GetRepresentedFilename() const {
|
||||||
return window_->GetRepresentedFilename();
|
return window_->GetRepresentedFilename();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -674,7 +674,7 @@ void BaseWindow::SetDocumentEdited(bool edited) {
|
||||||
window_->SetDocumentEdited(edited);
|
window_->SetDocumentEdited(edited);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BaseWindow::IsDocumentEdited() {
|
bool BaseWindow::IsDocumentEdited() const {
|
||||||
return window_->IsDocumentEdited();
|
return window_->IsDocumentEdited();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -694,7 +694,7 @@ void BaseWindow::SetFocusable(bool focusable) {
|
||||||
return window_->SetFocusable(focusable);
|
return window_->SetFocusable(focusable);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BaseWindow::IsFocusable() {
|
bool BaseWindow::IsFocusable() const {
|
||||||
return window_->IsFocusable();
|
return window_->IsFocusable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -796,7 +796,7 @@ void BaseWindow::SetVisibleOnAllWorkspaces(bool visible,
|
||||||
skipTransformProcessType);
|
skipTransformProcessType);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BaseWindow::IsVisibleOnAllWorkspaces() {
|
bool BaseWindow::IsVisibleOnAllWorkspaces() const {
|
||||||
return window_->IsVisibleOnAllWorkspaces();
|
return window_->IsVisibleOnAllWorkspaces();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -814,7 +814,7 @@ void BaseWindow::SetBackgroundMaterial(const std::string& material_type) {
|
||||||
}
|
}
|
||||||
|
|
||||||
#if BUILDFLAG(IS_MAC)
|
#if BUILDFLAG(IS_MAC)
|
||||||
std::string BaseWindow::GetAlwaysOnTopLevel() {
|
std::string BaseWindow::GetAlwaysOnTopLevel() const {
|
||||||
return window_->GetAlwaysOnTopLevel();
|
return window_->GetAlwaysOnTopLevel();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -900,7 +900,7 @@ void BaseWindow::SetAutoHideMenuBar(bool auto_hide) {
|
||||||
window_->SetAutoHideMenuBar(auto_hide);
|
window_->SetAutoHideMenuBar(auto_hide);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BaseWindow::IsMenuBarAutoHide() {
|
bool BaseWindow::IsMenuBarAutoHide() const {
|
||||||
return window_->IsMenuBarAutoHide();
|
return window_->IsMenuBarAutoHide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -908,7 +908,7 @@ void BaseWindow::SetMenuBarVisibility(bool visible) {
|
||||||
window_->SetMenuBarVisibility(visible);
|
window_->SetMenuBarVisibility(visible);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BaseWindow::IsMenuBarVisible() {
|
bool BaseWindow::IsMenuBarVisible() const {
|
||||||
return window_->IsMenuBarVisible();
|
return window_->IsMenuBarVisible();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -91,84 +91,84 @@ class BaseWindow : public gin_helper::TrackableObject<BaseWindow>,
|
||||||
virtual void CloseImmediately();
|
virtual void CloseImmediately();
|
||||||
virtual void Focus();
|
virtual void Focus();
|
||||||
virtual void Blur();
|
virtual void Blur();
|
||||||
bool IsFocused();
|
bool IsFocused() const;
|
||||||
void Show();
|
void Show();
|
||||||
void ShowInactive();
|
void ShowInactive();
|
||||||
void Hide();
|
void Hide();
|
||||||
bool IsVisible();
|
bool IsVisible() const;
|
||||||
bool IsEnabled();
|
bool IsEnabled() const;
|
||||||
void SetEnabled(bool enable);
|
void SetEnabled(bool enable);
|
||||||
void Maximize();
|
void Maximize();
|
||||||
void Unmaximize();
|
void Unmaximize();
|
||||||
bool IsMaximized();
|
bool IsMaximized() const;
|
||||||
void Minimize();
|
void Minimize();
|
||||||
void Restore();
|
void Restore();
|
||||||
bool IsMinimized();
|
bool IsMinimized() const;
|
||||||
void SetFullScreen(bool fullscreen);
|
void SetFullScreen(bool fullscreen);
|
||||||
bool IsFullscreen();
|
bool IsFullscreen() const;
|
||||||
void SetBounds(const gfx::Rect& bounds, gin_helper::Arguments* args);
|
void SetBounds(const gfx::Rect& bounds, gin_helper::Arguments* args);
|
||||||
gfx::Rect GetBounds();
|
gfx::Rect GetBounds() const;
|
||||||
void SetSize(int width, int height, gin_helper::Arguments* args);
|
void SetSize(int width, int height, gin_helper::Arguments* args);
|
||||||
std::vector<int> GetSize();
|
std::vector<int> GetSize() const;
|
||||||
void SetContentSize(int width, int height, gin_helper::Arguments* args);
|
void SetContentSize(int width, int height, gin_helper::Arguments* args);
|
||||||
std::vector<int> GetContentSize();
|
std::vector<int> GetContentSize() const;
|
||||||
void SetContentBounds(const gfx::Rect& bounds, gin_helper::Arguments* args);
|
void SetContentBounds(const gfx::Rect& bounds, gin_helper::Arguments* args);
|
||||||
gfx::Rect GetContentBounds();
|
gfx::Rect GetContentBounds() const;
|
||||||
bool IsNormal();
|
bool IsNormal() const;
|
||||||
gfx::Rect GetNormalBounds();
|
gfx::Rect GetNormalBounds() const;
|
||||||
void SetMinimumSize(int width, int height);
|
void SetMinimumSize(int width, int height);
|
||||||
std::vector<int> GetMinimumSize();
|
std::vector<int> GetMinimumSize() const;
|
||||||
void SetMaximumSize(int width, int height);
|
void SetMaximumSize(int width, int height);
|
||||||
std::vector<int> GetMaximumSize();
|
std::vector<int> GetMaximumSize() const;
|
||||||
void SetSheetOffset(double offsetY, gin_helper::Arguments* args);
|
void SetSheetOffset(double offsetY, gin_helper::Arguments* args);
|
||||||
void SetResizable(bool resizable);
|
void SetResizable(bool resizable);
|
||||||
bool IsResizable();
|
bool IsResizable() const;
|
||||||
void SetMovable(bool movable);
|
void SetMovable(bool movable);
|
||||||
void MoveAbove(const std::string& sourceId, gin_helper::Arguments* args);
|
void MoveAbove(const std::string& sourceId, gin_helper::Arguments* args);
|
||||||
void MoveTop();
|
void MoveTop();
|
||||||
bool IsMovable();
|
bool IsMovable() const;
|
||||||
void SetMinimizable(bool minimizable);
|
void SetMinimizable(bool minimizable);
|
||||||
bool IsMinimizable();
|
bool IsMinimizable() const;
|
||||||
void SetMaximizable(bool maximizable);
|
void SetMaximizable(bool maximizable);
|
||||||
bool IsMaximizable();
|
bool IsMaximizable() const;
|
||||||
void SetFullScreenable(bool fullscreenable);
|
void SetFullScreenable(bool fullscreenable);
|
||||||
bool IsFullScreenable();
|
bool IsFullScreenable() const;
|
||||||
void SetClosable(bool closable);
|
void SetClosable(bool closable);
|
||||||
bool IsClosable();
|
bool IsClosable() const;
|
||||||
void SetAlwaysOnTop(bool top, gin_helper::Arguments* args);
|
void SetAlwaysOnTop(bool top, gin_helper::Arguments* args);
|
||||||
bool IsAlwaysOnTop();
|
bool IsAlwaysOnTop() const;
|
||||||
void Center();
|
void Center();
|
||||||
void SetPosition(int x, int y, gin_helper::Arguments* args);
|
void SetPosition(int x, int y, gin_helper::Arguments* args);
|
||||||
std::vector<int> GetPosition();
|
std::vector<int> GetPosition() const;
|
||||||
void SetTitle(const std::string& title);
|
void SetTitle(const std::string& title);
|
||||||
std::string GetTitle();
|
std::string GetTitle() const;
|
||||||
void SetAccessibleTitle(const std::string& title);
|
void SetAccessibleTitle(const std::string& title);
|
||||||
std::string GetAccessibleTitle();
|
std::string GetAccessibleTitle() const;
|
||||||
void FlashFrame(bool flash);
|
void FlashFrame(bool flash);
|
||||||
void SetSkipTaskbar(bool skip);
|
void SetSkipTaskbar(bool skip);
|
||||||
void SetExcludedFromShownWindowsMenu(bool excluded);
|
void SetExcludedFromShownWindowsMenu(bool excluded);
|
||||||
bool IsExcludedFromShownWindowsMenu();
|
bool IsExcludedFromShownWindowsMenu() const;
|
||||||
void SetSimpleFullScreen(bool simple_fullscreen);
|
void SetSimpleFullScreen(bool simple_fullscreen);
|
||||||
bool IsSimpleFullScreen();
|
bool IsSimpleFullScreen() const;
|
||||||
void SetKiosk(bool kiosk);
|
void SetKiosk(bool kiosk);
|
||||||
bool IsKiosk();
|
bool IsKiosk() const;
|
||||||
bool IsTabletMode() const;
|
bool IsTabletMode() const;
|
||||||
virtual void SetBackgroundColor(const std::string& color_name);
|
virtual void SetBackgroundColor(const std::string& color_name);
|
||||||
std::string GetBackgroundColor(gin_helper::Arguments* args);
|
std::string GetBackgroundColor(gin_helper::Arguments* args) const;
|
||||||
void InvalidateShadow();
|
void InvalidateShadow();
|
||||||
void SetHasShadow(bool has_shadow);
|
void SetHasShadow(bool has_shadow);
|
||||||
bool HasShadow();
|
bool HasShadow() const;
|
||||||
void SetOpacity(const double opacity);
|
void SetOpacity(const double opacity);
|
||||||
double GetOpacity();
|
double GetOpacity() const;
|
||||||
void SetShape(const std::vector<gfx::Rect>& rects);
|
void SetShape(const std::vector<gfx::Rect>& rects);
|
||||||
void SetRepresentedFilename(const std::string& filename);
|
void SetRepresentedFilename(const std::string& filename);
|
||||||
std::string GetRepresentedFilename();
|
std::string GetRepresentedFilename() const;
|
||||||
void SetDocumentEdited(bool edited);
|
void SetDocumentEdited(bool edited);
|
||||||
bool IsDocumentEdited();
|
bool IsDocumentEdited() const;
|
||||||
void SetIgnoreMouseEvents(bool ignore, gin_helper::Arguments* args);
|
void SetIgnoreMouseEvents(bool ignore, gin_helper::Arguments* args);
|
||||||
void SetContentProtection(bool enable);
|
void SetContentProtection(bool enable);
|
||||||
void SetFocusable(bool focusable);
|
void SetFocusable(bool focusable);
|
||||||
bool IsFocusable();
|
bool IsFocusable() const;
|
||||||
void SetMenu(v8::Isolate* isolate, v8::Local<v8::Value> menu);
|
void SetMenu(v8::Isolate* isolate, v8::Local<v8::Value> menu);
|
||||||
void RemoveMenu();
|
void RemoveMenu();
|
||||||
void SetParentWindow(v8::Local<v8::Value> value, gin_helper::Arguments* args);
|
void SetParentWindow(v8::Local<v8::Value> value, gin_helper::Arguments* args);
|
||||||
|
@ -178,13 +178,13 @@ class BaseWindow : public gin_helper::TrackableObject<BaseWindow>,
|
||||||
void SetOverlayIcon(const gfx::Image& overlay,
|
void SetOverlayIcon(const gfx::Image& overlay,
|
||||||
const std::string& description);
|
const std::string& description);
|
||||||
void SetVisibleOnAllWorkspaces(bool visible, gin_helper::Arguments* args);
|
void SetVisibleOnAllWorkspaces(bool visible, gin_helper::Arguments* args);
|
||||||
bool IsVisibleOnAllWorkspaces();
|
bool IsVisibleOnAllWorkspaces() const;
|
||||||
void SetAutoHideCursor(bool auto_hide);
|
void SetAutoHideCursor(bool auto_hide);
|
||||||
virtual void SetVibrancy(v8::Isolate* isolate, v8::Local<v8::Value> value);
|
virtual void SetVibrancy(v8::Isolate* isolate, v8::Local<v8::Value> value);
|
||||||
void SetBackgroundMaterial(const std::string& vibrancy);
|
void SetBackgroundMaterial(const std::string& vibrancy);
|
||||||
|
|
||||||
#if BUILDFLAG(IS_MAC)
|
#if BUILDFLAG(IS_MAC)
|
||||||
std::string GetAlwaysOnTopLevel();
|
std::string GetAlwaysOnTopLevel() const;
|
||||||
void SetWindowButtonVisibility(bool visible);
|
void SetWindowButtonVisibility(bool visible);
|
||||||
bool GetWindowButtonVisibility() const;
|
bool GetWindowButtonVisibility() const;
|
||||||
void SetWindowButtonPosition(absl::optional<gfx::Point> position);
|
void SetWindowButtonPosition(absl::optional<gfx::Point> position);
|
||||||
|
@ -206,9 +206,9 @@ class BaseWindow : public gin_helper::TrackableObject<BaseWindow>,
|
||||||
void AddTabbedWindow(NativeWindow* window, gin_helper::Arguments* args);
|
void AddTabbedWindow(NativeWindow* window, gin_helper::Arguments* args);
|
||||||
v8::Local<v8::Value> GetTabbingIdentifier();
|
v8::Local<v8::Value> GetTabbingIdentifier();
|
||||||
void SetAutoHideMenuBar(bool auto_hide);
|
void SetAutoHideMenuBar(bool auto_hide);
|
||||||
bool IsMenuBarAutoHide();
|
bool IsMenuBarAutoHide() const;
|
||||||
void SetMenuBarVisibility(bool visible);
|
void SetMenuBarVisibility(bool visible);
|
||||||
bool IsMenuBarVisible();
|
bool IsMenuBarVisible() const;
|
||||||
void SetAspectRatio(double aspect_ratio, gin_helper::Arguments* args);
|
void SetAspectRatio(double aspect_ratio, gin_helper::Arguments* args);
|
||||||
void PreviewFile(const std::string& path, gin_helper::Arguments* args);
|
void PreviewFile(const std::string& path, gin_helper::Arguments* args);
|
||||||
void CloseFilePreview();
|
void CloseFilePreview();
|
||||||
|
|
|
@ -297,7 +297,7 @@ void NativeWindow::SetSize(const gfx::Size& size, bool animate) {
|
||||||
SetBounds(gfx::Rect(GetPosition(), size), animate);
|
SetBounds(gfx::Rect(GetPosition(), size), animate);
|
||||||
}
|
}
|
||||||
|
|
||||||
gfx::Size NativeWindow::GetSize() {
|
gfx::Size NativeWindow::GetSize() const {
|
||||||
return GetBounds().size();
|
return GetBounds().size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -305,7 +305,7 @@ void NativeWindow::SetPosition(const gfx::Point& position, bool animate) {
|
||||||
SetBounds(gfx::Rect(position, GetSize()), animate);
|
SetBounds(gfx::Rect(position, GetSize()), animate);
|
||||||
}
|
}
|
||||||
|
|
||||||
gfx::Point NativeWindow::GetPosition() {
|
gfx::Point NativeWindow::GetPosition() const {
|
||||||
return GetBounds().origin();
|
return GetBounds().origin();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -313,7 +313,7 @@ void NativeWindow::SetContentSize(const gfx::Size& size, bool animate) {
|
||||||
SetSize(ContentBoundsToWindowBounds(gfx::Rect(size)).size(), animate);
|
SetSize(ContentBoundsToWindowBounds(gfx::Rect(size)).size(), animate);
|
||||||
}
|
}
|
||||||
|
|
||||||
gfx::Size NativeWindow::GetContentSize() {
|
gfx::Size NativeWindow::GetContentSize() const {
|
||||||
return GetContentBounds().size();
|
return GetContentBounds().size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -321,11 +321,11 @@ void NativeWindow::SetContentBounds(const gfx::Rect& bounds, bool animate) {
|
||||||
SetBounds(ContentBoundsToWindowBounds(bounds), animate);
|
SetBounds(ContentBoundsToWindowBounds(bounds), animate);
|
||||||
}
|
}
|
||||||
|
|
||||||
gfx::Rect NativeWindow::GetContentBounds() {
|
gfx::Rect NativeWindow::GetContentBounds() const {
|
||||||
return WindowBoundsToContentBounds(GetBounds());
|
return WindowBoundsToContentBounds(GetBounds());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NativeWindow::IsNormal() {
|
bool NativeWindow::IsNormal() const {
|
||||||
return !IsMinimized() && !IsMaximized() && !IsFullscreen();
|
return !IsMinimized() && !IsMaximized() && !IsFullscreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -432,11 +432,11 @@ void NativeWindow::SetSheetOffset(const double offsetX, const double offsetY) {
|
||||||
sheet_offset_y_ = offsetY;
|
sheet_offset_y_ = offsetY;
|
||||||
}
|
}
|
||||||
|
|
||||||
double NativeWindow::GetSheetOffsetX() {
|
double NativeWindow::GetSheetOffsetX() const {
|
||||||
return sheet_offset_x_;
|
return sheet_offset_x_;
|
||||||
}
|
}
|
||||||
|
|
||||||
double NativeWindow::GetSheetOffsetY() {
|
double NativeWindow::GetSheetOffsetY() const {
|
||||||
return sheet_offset_y_;
|
return sheet_offset_y_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -446,19 +446,19 @@ bool NativeWindow::IsTabletMode() const {
|
||||||
|
|
||||||
void NativeWindow::SetRepresentedFilename(const std::string& filename) {}
|
void NativeWindow::SetRepresentedFilename(const std::string& filename) {}
|
||||||
|
|
||||||
std::string NativeWindow::GetRepresentedFilename() {
|
std::string NativeWindow::GetRepresentedFilename() const {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
void NativeWindow::SetDocumentEdited(bool edited) {}
|
void NativeWindow::SetDocumentEdited(bool edited) {}
|
||||||
|
|
||||||
bool NativeWindow::IsDocumentEdited() {
|
bool NativeWindow::IsDocumentEdited() const {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void NativeWindow::SetFocusable(bool focusable) {}
|
void NativeWindow::SetFocusable(bool focusable) {}
|
||||||
|
|
||||||
bool NativeWindow::IsFocusable() {
|
bool NativeWindow::IsFocusable() const {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -510,21 +510,21 @@ void NativeWindow::SetEscapeTouchBarItem(
|
||||||
|
|
||||||
void NativeWindow::SetAutoHideMenuBar(bool auto_hide) {}
|
void NativeWindow::SetAutoHideMenuBar(bool auto_hide) {}
|
||||||
|
|
||||||
bool NativeWindow::IsMenuBarAutoHide() {
|
bool NativeWindow::IsMenuBarAutoHide() const {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void NativeWindow::SetMenuBarVisibility(bool visible) {}
|
void NativeWindow::SetMenuBarVisibility(bool visible) {}
|
||||||
|
|
||||||
bool NativeWindow::IsMenuBarVisible() {
|
bool NativeWindow::IsMenuBarVisible() const {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
double NativeWindow::GetAspectRatio() {
|
double NativeWindow::GetAspectRatio() const {
|
||||||
return aspect_ratio_;
|
return aspect_ratio_;
|
||||||
}
|
}
|
||||||
|
|
||||||
gfx::Size NativeWindow::GetAspectRatioExtraSize() {
|
gfx::Size NativeWindow::GetAspectRatioExtraSize() const {
|
||||||
return aspect_ratio_extraSize_;
|
return aspect_ratio_extraSize_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -83,33 +83,33 @@ class NativeWindow : public base::SupportsUserData,
|
||||||
virtual void CloseImmediately() = 0;
|
virtual void CloseImmediately() = 0;
|
||||||
virtual bool IsClosed() const;
|
virtual bool IsClosed() const;
|
||||||
virtual void Focus(bool focus) = 0;
|
virtual void Focus(bool focus) = 0;
|
||||||
virtual bool IsFocused() = 0;
|
virtual bool IsFocused() const = 0;
|
||||||
virtual void Show() = 0;
|
virtual void Show() = 0;
|
||||||
virtual void ShowInactive() = 0;
|
virtual void ShowInactive() = 0;
|
||||||
virtual void Hide() = 0;
|
virtual void Hide() = 0;
|
||||||
virtual bool IsVisible() = 0;
|
virtual bool IsVisible() const = 0;
|
||||||
virtual bool IsEnabled() = 0;
|
virtual bool IsEnabled() const = 0;
|
||||||
virtual void SetEnabled(bool enable) = 0;
|
virtual void SetEnabled(bool enable) = 0;
|
||||||
virtual void Maximize() = 0;
|
virtual void Maximize() = 0;
|
||||||
virtual void Unmaximize() = 0;
|
virtual void Unmaximize() = 0;
|
||||||
virtual bool IsMaximized() = 0;
|
virtual bool IsMaximized() const = 0;
|
||||||
virtual void Minimize() = 0;
|
virtual void Minimize() = 0;
|
||||||
virtual void Restore() = 0;
|
virtual void Restore() = 0;
|
||||||
virtual bool IsMinimized() = 0;
|
virtual bool IsMinimized() const = 0;
|
||||||
virtual void SetFullScreen(bool fullscreen) = 0;
|
virtual void SetFullScreen(bool fullscreen) = 0;
|
||||||
virtual bool IsFullscreen() const = 0;
|
virtual bool IsFullscreen() const = 0;
|
||||||
virtual void SetBounds(const gfx::Rect& bounds, bool animate = false) = 0;
|
virtual void SetBounds(const gfx::Rect& bounds, bool animate = false) = 0;
|
||||||
virtual gfx::Rect GetBounds() = 0;
|
virtual gfx::Rect GetBounds() const = 0;
|
||||||
virtual void SetSize(const gfx::Size& size, bool animate = false);
|
virtual void SetSize(const gfx::Size& size, bool animate = false);
|
||||||
virtual gfx::Size GetSize();
|
virtual gfx::Size GetSize() const;
|
||||||
virtual void SetPosition(const gfx::Point& position, bool animate = false);
|
virtual void SetPosition(const gfx::Point& position, bool animate = false);
|
||||||
virtual gfx::Point GetPosition();
|
virtual gfx::Point GetPosition() const;
|
||||||
virtual void SetContentSize(const gfx::Size& size, bool animate = false);
|
virtual void SetContentSize(const gfx::Size& size, bool animate = false);
|
||||||
virtual gfx::Size GetContentSize();
|
virtual gfx::Size GetContentSize() const;
|
||||||
virtual void SetContentBounds(const gfx::Rect& bounds, bool animate = false);
|
virtual void SetContentBounds(const gfx::Rect& bounds, bool animate = false);
|
||||||
virtual gfx::Rect GetContentBounds();
|
virtual gfx::Rect GetContentBounds() const;
|
||||||
virtual bool IsNormal();
|
virtual bool IsNormal() const;
|
||||||
virtual gfx::Rect GetNormalBounds() = 0;
|
virtual gfx::Rect GetNormalBounds() const = 0;
|
||||||
virtual void SetSizeConstraints(
|
virtual void SetSizeConstraints(
|
||||||
const extensions::SizeConstraints& window_constraints);
|
const extensions::SizeConstraints& window_constraints);
|
||||||
virtual extensions::SizeConstraints GetSizeConstraints() const;
|
virtual extensions::SizeConstraints GetSizeConstraints() const;
|
||||||
|
@ -123,32 +123,32 @@ class NativeWindow : public base::SupportsUserData,
|
||||||
virtual gfx::Size GetContentMinimumSize() const;
|
virtual gfx::Size GetContentMinimumSize() const;
|
||||||
virtual gfx::Size GetContentMaximumSize() const;
|
virtual gfx::Size GetContentMaximumSize() const;
|
||||||
virtual void SetSheetOffset(const double offsetX, const double offsetY);
|
virtual void SetSheetOffset(const double offsetX, const double offsetY);
|
||||||
virtual double GetSheetOffsetX();
|
virtual double GetSheetOffsetX() const;
|
||||||
virtual double GetSheetOffsetY();
|
virtual double GetSheetOffsetY() const;
|
||||||
virtual void SetResizable(bool resizable) = 0;
|
virtual void SetResizable(bool resizable) = 0;
|
||||||
virtual bool MoveAbove(const std::string& sourceId) = 0;
|
virtual bool MoveAbove(const std::string& sourceId) = 0;
|
||||||
virtual void MoveTop() = 0;
|
virtual void MoveTop() = 0;
|
||||||
virtual bool IsResizable() = 0;
|
virtual bool IsResizable() const = 0;
|
||||||
virtual void SetMovable(bool movable) = 0;
|
virtual void SetMovable(bool movable) = 0;
|
||||||
virtual bool IsMovable() = 0;
|
virtual bool IsMovable() const = 0;
|
||||||
virtual void SetMinimizable(bool minimizable) = 0;
|
virtual void SetMinimizable(bool minimizable) = 0;
|
||||||
virtual bool IsMinimizable() = 0;
|
virtual bool IsMinimizable() const = 0;
|
||||||
virtual void SetMaximizable(bool maximizable) = 0;
|
virtual void SetMaximizable(bool maximizable) = 0;
|
||||||
virtual bool IsMaximizable() = 0;
|
virtual bool IsMaximizable() const = 0;
|
||||||
virtual void SetFullScreenable(bool fullscreenable) = 0;
|
virtual void SetFullScreenable(bool fullscreenable) = 0;
|
||||||
virtual bool IsFullScreenable() = 0;
|
virtual bool IsFullScreenable() const = 0;
|
||||||
virtual void SetClosable(bool closable) = 0;
|
virtual void SetClosable(bool closable) = 0;
|
||||||
virtual bool IsClosable() = 0;
|
virtual bool IsClosable() const = 0;
|
||||||
virtual void SetAlwaysOnTop(ui::ZOrderLevel z_order,
|
virtual void SetAlwaysOnTop(ui::ZOrderLevel z_order,
|
||||||
const std::string& level = "floating",
|
const std::string& level = "floating",
|
||||||
int relativeLevel = 0) = 0;
|
int relativeLevel = 0) = 0;
|
||||||
virtual ui::ZOrderLevel GetZOrderLevel() = 0;
|
virtual ui::ZOrderLevel GetZOrderLevel() const = 0;
|
||||||
virtual void Center() = 0;
|
virtual void Center() = 0;
|
||||||
virtual void Invalidate() = 0;
|
virtual void Invalidate() = 0;
|
||||||
virtual void SetTitle(const std::string& title) = 0;
|
virtual void SetTitle(const std::string& title) = 0;
|
||||||
virtual std::string GetTitle() = 0;
|
virtual std::string GetTitle() const = 0;
|
||||||
#if BUILDFLAG(IS_MAC)
|
#if BUILDFLAG(IS_MAC)
|
||||||
virtual std::string GetAlwaysOnTopLevel() = 0;
|
virtual std::string GetAlwaysOnTopLevel() const = 0;
|
||||||
virtual void SetActive(bool is_key) = 0;
|
virtual void SetActive(bool is_key) = 0;
|
||||||
virtual bool IsActive() const = 0;
|
virtual bool IsActive() const = 0;
|
||||||
virtual void RemoveChildFromParentWindow() = 0;
|
virtual void RemoveChildFromParentWindow() = 0;
|
||||||
|
@ -164,27 +164,27 @@ class NativeWindow : public base::SupportsUserData,
|
||||||
virtual void FlashFrame(bool flash) = 0;
|
virtual void FlashFrame(bool flash) = 0;
|
||||||
virtual void SetSkipTaskbar(bool skip) = 0;
|
virtual void SetSkipTaskbar(bool skip) = 0;
|
||||||
virtual void SetExcludedFromShownWindowsMenu(bool excluded) = 0;
|
virtual void SetExcludedFromShownWindowsMenu(bool excluded) = 0;
|
||||||
virtual bool IsExcludedFromShownWindowsMenu() = 0;
|
virtual bool IsExcludedFromShownWindowsMenu() const = 0;
|
||||||
virtual void SetSimpleFullScreen(bool simple_fullscreen) = 0;
|
virtual void SetSimpleFullScreen(bool simple_fullscreen) = 0;
|
||||||
virtual bool IsSimpleFullScreen() = 0;
|
virtual bool IsSimpleFullScreen() const = 0;
|
||||||
virtual void SetKiosk(bool kiosk) = 0;
|
virtual void SetKiosk(bool kiosk) = 0;
|
||||||
virtual bool IsKiosk() = 0;
|
virtual bool IsKiosk() const = 0;
|
||||||
virtual bool IsTabletMode() const;
|
virtual bool IsTabletMode() const;
|
||||||
virtual void SetBackgroundColor(SkColor color) = 0;
|
virtual void SetBackgroundColor(SkColor color) = 0;
|
||||||
virtual SkColor GetBackgroundColor() = 0;
|
virtual SkColor GetBackgroundColor() const = 0;
|
||||||
virtual void InvalidateShadow();
|
virtual void InvalidateShadow();
|
||||||
virtual void SetHasShadow(bool has_shadow) = 0;
|
virtual void SetHasShadow(bool has_shadow) = 0;
|
||||||
virtual bool HasShadow() = 0;
|
virtual bool HasShadow() const = 0;
|
||||||
virtual void SetOpacity(const double opacity) = 0;
|
virtual void SetOpacity(const double opacity) = 0;
|
||||||
virtual double GetOpacity() = 0;
|
virtual double GetOpacity() const = 0;
|
||||||
virtual void SetRepresentedFilename(const std::string& filename);
|
virtual void SetRepresentedFilename(const std::string& filename);
|
||||||
virtual std::string GetRepresentedFilename();
|
virtual std::string GetRepresentedFilename() const;
|
||||||
virtual void SetDocumentEdited(bool edited);
|
virtual void SetDocumentEdited(bool edited);
|
||||||
virtual bool IsDocumentEdited();
|
virtual bool IsDocumentEdited() const;
|
||||||
virtual void SetIgnoreMouseEvents(bool ignore, bool forward) = 0;
|
virtual void SetIgnoreMouseEvents(bool ignore, bool forward) = 0;
|
||||||
virtual void SetContentProtection(bool enable) = 0;
|
virtual void SetContentProtection(bool enable) = 0;
|
||||||
virtual void SetFocusable(bool focusable);
|
virtual void SetFocusable(bool focusable);
|
||||||
virtual bool IsFocusable();
|
virtual bool IsFocusable() const;
|
||||||
virtual void SetMenu(ElectronMenuModel* menu);
|
virtual void SetMenu(ElectronMenuModel* menu);
|
||||||
virtual void SetParentWindow(NativeWindow* parent);
|
virtual void SetParentWindow(NativeWindow* parent);
|
||||||
virtual content::DesktopMediaID GetDesktopMediaID() const = 0;
|
virtual content::DesktopMediaID GetDesktopMediaID() const = 0;
|
||||||
|
@ -212,7 +212,7 @@ class NativeWindow : public base::SupportsUserData,
|
||||||
bool visibleOnFullScreen = false,
|
bool visibleOnFullScreen = false,
|
||||||
bool skipTransformProcessType = false) = 0;
|
bool skipTransformProcessType = false) = 0;
|
||||||
|
|
||||||
virtual bool IsVisibleOnAllWorkspaces() = 0;
|
virtual bool IsVisibleOnAllWorkspaces() const = 0;
|
||||||
|
|
||||||
virtual void SetAutoHideCursor(bool auto_hide);
|
virtual void SetAutoHideCursor(bool auto_hide);
|
||||||
|
|
||||||
|
@ -237,7 +237,7 @@ class NativeWindow : public base::SupportsUserData,
|
||||||
|
|
||||||
// whether windows should be ignored by mission control
|
// whether windows should be ignored by mission control
|
||||||
#if BUILDFLAG(IS_MAC)
|
#if BUILDFLAG(IS_MAC)
|
||||||
virtual bool IsHiddenInMissionControl() = 0;
|
virtual bool IsHiddenInMissionControl() const = 0;
|
||||||
virtual void SetHiddenInMissionControl(bool hidden) = 0;
|
virtual void SetHiddenInMissionControl(bool hidden) = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -258,13 +258,13 @@ class NativeWindow : public base::SupportsUserData,
|
||||||
|
|
||||||
// Toggle the menu bar.
|
// Toggle the menu bar.
|
||||||
virtual void SetAutoHideMenuBar(bool auto_hide);
|
virtual void SetAutoHideMenuBar(bool auto_hide);
|
||||||
virtual bool IsMenuBarAutoHide();
|
virtual bool IsMenuBarAutoHide() const;
|
||||||
virtual void SetMenuBarVisibility(bool visible);
|
virtual void SetMenuBarVisibility(bool visible);
|
||||||
virtual bool IsMenuBarVisible();
|
virtual bool IsMenuBarVisible() const;
|
||||||
|
|
||||||
// Set the aspect ratio when resizing window.
|
// Set the aspect ratio when resizing window.
|
||||||
double GetAspectRatio();
|
double GetAspectRatio() const;
|
||||||
gfx::Size GetAspectRatioExtraSize();
|
gfx::Size GetAspectRatioExtraSize() const;
|
||||||
virtual void SetAspectRatio(double aspect_ratio, const gfx::Size& extra_size);
|
virtual void SetAspectRatio(double aspect_ratio, const gfx::Size& extra_size);
|
||||||
|
|
||||||
// File preview APIs.
|
// File preview APIs.
|
||||||
|
|
|
@ -39,25 +39,25 @@ class NativeWindowMac : public NativeWindow,
|
||||||
void Close() override;
|
void Close() override;
|
||||||
void CloseImmediately() override;
|
void CloseImmediately() override;
|
||||||
void Focus(bool focus) override;
|
void Focus(bool focus) override;
|
||||||
bool IsFocused() override;
|
bool IsFocused() const override;
|
||||||
void Show() override;
|
void Show() override;
|
||||||
void ShowInactive() override;
|
void ShowInactive() override;
|
||||||
void Hide() override;
|
void Hide() override;
|
||||||
bool IsVisible() override;
|
bool IsVisible() const override;
|
||||||
bool IsEnabled() override;
|
bool IsEnabled() const override;
|
||||||
void SetEnabled(bool enable) override;
|
void SetEnabled(bool enable) override;
|
||||||
void Maximize() override;
|
void Maximize() override;
|
||||||
void Unmaximize() override;
|
void Unmaximize() override;
|
||||||
bool IsMaximized() override;
|
bool IsMaximized() const override;
|
||||||
void Minimize() override;
|
void Minimize() override;
|
||||||
void Restore() override;
|
void Restore() override;
|
||||||
bool IsMinimized() override;
|
bool IsMinimized() const override;
|
||||||
void SetFullScreen(bool fullscreen) override;
|
void SetFullScreen(bool fullscreen) override;
|
||||||
bool IsFullscreen() const override;
|
bool IsFullscreen() const override;
|
||||||
void SetBounds(const gfx::Rect& bounds, bool animate = false) override;
|
void SetBounds(const gfx::Rect& bounds, bool animate = false) override;
|
||||||
gfx::Rect GetBounds() override;
|
gfx::Rect GetBounds() const override;
|
||||||
bool IsNormal() override;
|
bool IsNormal() const override;
|
||||||
gfx::Rect GetNormalBounds() override;
|
gfx::Rect GetNormalBounds() const override;
|
||||||
void SetSizeConstraints(
|
void SetSizeConstraints(
|
||||||
const extensions::SizeConstraints& window_constraints) override;
|
const extensions::SizeConstraints& window_constraints) override;
|
||||||
void SetContentSizeConstraints(
|
void SetContentSizeConstraints(
|
||||||
|
@ -65,51 +65,51 @@ class NativeWindowMac : public NativeWindow,
|
||||||
void SetResizable(bool resizable) override;
|
void SetResizable(bool resizable) override;
|
||||||
bool MoveAbove(const std::string& sourceId) override;
|
bool MoveAbove(const std::string& sourceId) override;
|
||||||
void MoveTop() override;
|
void MoveTop() override;
|
||||||
bool IsResizable() override;
|
bool IsResizable() const override;
|
||||||
void SetMovable(bool movable) override;
|
void SetMovable(bool movable) override;
|
||||||
bool IsMovable() override;
|
bool IsMovable() const override;
|
||||||
void SetMinimizable(bool minimizable) override;
|
void SetMinimizable(bool minimizable) override;
|
||||||
bool IsMinimizable() override;
|
bool IsMinimizable() const override;
|
||||||
void SetMaximizable(bool maximizable) override;
|
void SetMaximizable(bool maximizable) override;
|
||||||
bool IsMaximizable() override;
|
bool IsMaximizable() const override;
|
||||||
void SetFullScreenable(bool fullscreenable) override;
|
void SetFullScreenable(bool fullscreenable) override;
|
||||||
bool IsFullScreenable() override;
|
bool IsFullScreenable() const override;
|
||||||
void SetClosable(bool closable) override;
|
void SetClosable(bool closable) override;
|
||||||
bool IsClosable() override;
|
bool IsClosable() const override;
|
||||||
void SetAlwaysOnTop(ui::ZOrderLevel z_order,
|
void SetAlwaysOnTop(ui::ZOrderLevel z_order,
|
||||||
const std::string& level,
|
const std::string& level,
|
||||||
int relative_level) override;
|
int relative_level) override;
|
||||||
std::string GetAlwaysOnTopLevel() override;
|
std::string GetAlwaysOnTopLevel() const override;
|
||||||
ui::ZOrderLevel GetZOrderLevel() override;
|
ui::ZOrderLevel GetZOrderLevel() const override;
|
||||||
void Center() override;
|
void Center() override;
|
||||||
void Invalidate() override;
|
void Invalidate() override;
|
||||||
void SetTitle(const std::string& title) override;
|
void SetTitle(const std::string& title) override;
|
||||||
std::string GetTitle() override;
|
std::string GetTitle() const override;
|
||||||
void FlashFrame(bool flash) override;
|
void FlashFrame(bool flash) override;
|
||||||
void SetSkipTaskbar(bool skip) override;
|
void SetSkipTaskbar(bool skip) override;
|
||||||
void SetExcludedFromShownWindowsMenu(bool excluded) override;
|
void SetExcludedFromShownWindowsMenu(bool excluded) override;
|
||||||
bool IsExcludedFromShownWindowsMenu() override;
|
bool IsExcludedFromShownWindowsMenu() const override;
|
||||||
void SetSimpleFullScreen(bool simple_fullscreen) override;
|
void SetSimpleFullScreen(bool simple_fullscreen) override;
|
||||||
bool IsSimpleFullScreen() override;
|
bool IsSimpleFullScreen() const override;
|
||||||
void SetKiosk(bool kiosk) override;
|
void SetKiosk(bool kiosk) override;
|
||||||
bool IsKiosk() override;
|
bool IsKiosk() const override;
|
||||||
void SetBackgroundColor(SkColor color) override;
|
void SetBackgroundColor(SkColor color) override;
|
||||||
SkColor GetBackgroundColor() override;
|
SkColor GetBackgroundColor() const override;
|
||||||
void InvalidateShadow() override;
|
void InvalidateShadow() override;
|
||||||
void SetHasShadow(bool has_shadow) override;
|
void SetHasShadow(bool has_shadow) override;
|
||||||
bool HasShadow() override;
|
bool HasShadow() const override;
|
||||||
void SetOpacity(const double opacity) override;
|
void SetOpacity(const double opacity) override;
|
||||||
double GetOpacity() override;
|
double GetOpacity() const override;
|
||||||
void SetRepresentedFilename(const std::string& filename) override;
|
void SetRepresentedFilename(const std::string& filename) override;
|
||||||
std::string GetRepresentedFilename() override;
|
std::string GetRepresentedFilename() const override;
|
||||||
void SetDocumentEdited(bool edited) override;
|
void SetDocumentEdited(bool edited) override;
|
||||||
bool IsDocumentEdited() override;
|
bool IsDocumentEdited() const override;
|
||||||
void SetIgnoreMouseEvents(bool ignore, bool forward) override;
|
void SetIgnoreMouseEvents(bool ignore, bool forward) override;
|
||||||
bool IsHiddenInMissionControl() override;
|
bool IsHiddenInMissionControl() const override;
|
||||||
void SetHiddenInMissionControl(bool hidden) override;
|
void SetHiddenInMissionControl(bool hidden) override;
|
||||||
void SetContentProtection(bool enable) override;
|
void SetContentProtection(bool enable) override;
|
||||||
void SetFocusable(bool focusable) override;
|
void SetFocusable(bool focusable) override;
|
||||||
bool IsFocusable() override;
|
bool IsFocusable() const override;
|
||||||
void SetParentWindow(NativeWindow* parent) override;
|
void SetParentWindow(NativeWindow* parent) override;
|
||||||
content::DesktopMediaID GetDesktopMediaID() const override;
|
content::DesktopMediaID GetDesktopMediaID() const override;
|
||||||
gfx::NativeView GetNativeView() const override;
|
gfx::NativeView GetNativeView() const override;
|
||||||
|
@ -122,7 +122,7 @@ class NativeWindowMac : public NativeWindow,
|
||||||
void SetVisibleOnAllWorkspaces(bool visible,
|
void SetVisibleOnAllWorkspaces(bool visible,
|
||||||
bool visibleOnFullScreen,
|
bool visibleOnFullScreen,
|
||||||
bool skipTransformProcessType) override;
|
bool skipTransformProcessType) override;
|
||||||
bool IsVisibleOnAllWorkspaces() override;
|
bool IsVisibleOnAllWorkspaces() const override;
|
||||||
void SetAutoHideCursor(bool auto_hide) override;
|
void SetAutoHideCursor(bool auto_hide) override;
|
||||||
void SetVibrancy(const std::string& type) override;
|
void SetVibrancy(const std::string& type) override;
|
||||||
void SetWindowButtonVisibility(bool visible) override;
|
void SetWindowButtonVisibility(bool visible) override;
|
||||||
|
|
|
@ -498,7 +498,7 @@ void NativeWindowMac::Focus(bool focus) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NativeWindowMac::IsFocused() {
|
bool NativeWindowMac::IsFocused() const {
|
||||||
return [window_ isKeyWindow];
|
return [window_ isKeyWindow];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -561,12 +561,12 @@ void NativeWindowMac::Hide() {
|
||||||
[window_ orderOut:nil];
|
[window_ orderOut:nil];
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NativeWindowMac::IsVisible() {
|
bool NativeWindowMac::IsVisible() const {
|
||||||
bool occluded = [window_ occlusionState] == NSWindowOcclusionStateVisible;
|
bool occluded = [window_ occlusionState] == NSWindowOcclusionStateVisible;
|
||||||
return [window_ isVisible] && !occluded && !IsMinimized();
|
return [window_ isVisible] && !occluded && !IsMinimized();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NativeWindowMac::IsEnabled() {
|
bool NativeWindowMac::IsEnabled() const {
|
||||||
return [window_ attachedSheet] == nil;
|
return [window_ attachedSheet] == nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -629,7 +629,7 @@ void NativeWindowMac::Unmaximize() {
|
||||||
[window_ zoom:nil];
|
[window_ zoom:nil];
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NativeWindowMac::IsMaximized() {
|
bool NativeWindowMac::IsMaximized() const {
|
||||||
// It's possible for [window_ isZoomed] to be true
|
// It's possible for [window_ isZoomed] to be true
|
||||||
// when the window is minimized or fullscreened.
|
// when the window is minimized or fullscreened.
|
||||||
if (IsMinimized() || IsFullscreen())
|
if (IsMinimized() || IsFullscreen())
|
||||||
|
@ -659,7 +659,7 @@ void NativeWindowMac::Restore() {
|
||||||
[window_ deminiaturize:nil];
|
[window_ deminiaturize:nil];
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NativeWindowMac::IsMinimized() {
|
bool NativeWindowMac::IsMinimized() const {
|
||||||
return [window_ isMiniaturized];
|
return [window_ isMiniaturized];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -774,7 +774,7 @@ void NativeWindowMac::SetBounds(const gfx::Rect& bounds, bool animate) {
|
||||||
UpdateWindowOriginalFrame();
|
UpdateWindowOriginalFrame();
|
||||||
}
|
}
|
||||||
|
|
||||||
gfx::Rect NativeWindowMac::GetBounds() {
|
gfx::Rect NativeWindowMac::GetBounds() const {
|
||||||
NSRect frame = [window_ frame];
|
NSRect frame = [window_ frame];
|
||||||
gfx::Rect bounds(frame.origin.x, 0, NSWidth(frame), NSHeight(frame));
|
gfx::Rect bounds(frame.origin.x, 0, NSWidth(frame), NSHeight(frame));
|
||||||
NSScreen* screen = [[NSScreen screens] firstObject];
|
NSScreen* screen = [[NSScreen screens] firstObject];
|
||||||
|
@ -782,11 +782,11 @@ gfx::Rect NativeWindowMac::GetBounds() {
|
||||||
return bounds;
|
return bounds;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NativeWindowMac::IsNormal() {
|
bool NativeWindowMac::IsNormal() const {
|
||||||
return NativeWindow::IsNormal() && !IsSimpleFullScreen();
|
return NativeWindow::IsNormal() && !IsSimpleFullScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
gfx::Rect NativeWindowMac::GetNormalBounds() {
|
gfx::Rect NativeWindowMac::GetNormalBounds() const {
|
||||||
if (IsNormal()) {
|
if (IsNormal()) {
|
||||||
return GetBounds();
|
return GetBounds();
|
||||||
}
|
}
|
||||||
|
@ -883,7 +883,7 @@ void NativeWindowMac::SetResizable(bool resizable) {
|
||||||
setEnabled:resizable ? was_fullscreenable : false];
|
setEnabled:resizable ? was_fullscreenable : false];
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NativeWindowMac::IsResizable() {
|
bool NativeWindowMac::IsResizable() const {
|
||||||
bool in_fs_transition =
|
bool in_fs_transition =
|
||||||
fullscreen_transition_state() != FullScreenTransitionState::kNone;
|
fullscreen_transition_state() != FullScreenTransitionState::kNone;
|
||||||
bool has_rs_mask = HasStyleMask(NSWindowStyleMaskResizable);
|
bool has_rs_mask = HasStyleMask(NSWindowStyleMaskResizable);
|
||||||
|
@ -894,7 +894,7 @@ void NativeWindowMac::SetMovable(bool movable) {
|
||||||
[window_ setMovable:movable];
|
[window_ setMovable:movable];
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NativeWindowMac::IsMovable() {
|
bool NativeWindowMac::IsMovable() const {
|
||||||
return [window_ isMovable];
|
return [window_ isMovable];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -902,7 +902,7 @@ void NativeWindowMac::SetMinimizable(bool minimizable) {
|
||||||
SetStyleMask(minimizable, NSWindowStyleMaskMiniaturizable);
|
SetStyleMask(minimizable, NSWindowStyleMaskMiniaturizable);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NativeWindowMac::IsMinimizable() {
|
bool NativeWindowMac::IsMinimizable() const {
|
||||||
return HasStyleMask(NSWindowStyleMaskMiniaturizable);
|
return HasStyleMask(NSWindowStyleMaskMiniaturizable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -911,7 +911,7 @@ void NativeWindowMac::SetMaximizable(bool maximizable) {
|
||||||
[[window_ standardWindowButton:NSWindowZoomButton] setEnabled:maximizable];
|
[[window_ standardWindowButton:NSWindowZoomButton] setEnabled:maximizable];
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NativeWindowMac::IsMaximizable() {
|
bool NativeWindowMac::IsMaximizable() const {
|
||||||
return [[window_ standardWindowButton:NSWindowZoomButton] isEnabled];
|
return [[window_ standardWindowButton:NSWindowZoomButton] isEnabled];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -923,7 +923,7 @@ void NativeWindowMac::SetFullScreenable(bool fullscreenable) {
|
||||||
NSWindowCollectionBehaviorFullScreenAuxiliary);
|
NSWindowCollectionBehaviorFullScreenAuxiliary);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NativeWindowMac::IsFullScreenable() {
|
bool NativeWindowMac::IsFullScreenable() const {
|
||||||
NSUInteger collectionBehavior = [window_ collectionBehavior];
|
NSUInteger collectionBehavior = [window_ collectionBehavior];
|
||||||
return collectionBehavior & NSWindowCollectionBehaviorFullScreenPrimary;
|
return collectionBehavior & NSWindowCollectionBehaviorFullScreenPrimary;
|
||||||
}
|
}
|
||||||
|
@ -932,7 +932,7 @@ void NativeWindowMac::SetClosable(bool closable) {
|
||||||
SetStyleMask(closable, NSWindowStyleMaskClosable);
|
SetStyleMask(closable, NSWindowStyleMaskClosable);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NativeWindowMac::IsClosable() {
|
bool NativeWindowMac::IsClosable() const {
|
||||||
return HasStyleMask(NSWindowStyleMaskClosable);
|
return HasStyleMask(NSWindowStyleMaskClosable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -964,7 +964,7 @@ void NativeWindowMac::SetAlwaysOnTop(ui::ZOrderLevel z_order,
|
||||||
SetWindowLevel(level + relative_level);
|
SetWindowLevel(level + relative_level);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string NativeWindowMac::GetAlwaysOnTopLevel() {
|
std::string NativeWindowMac::GetAlwaysOnTopLevel() const {
|
||||||
std::string level_name = "normal";
|
std::string level_name = "normal";
|
||||||
|
|
||||||
int level = [window_ level];
|
int level = [window_ level];
|
||||||
|
@ -1015,7 +1015,7 @@ void NativeWindowMac::SetWindowLevel(int unbounded_level) {
|
||||||
NativeWindow::NotifyWindowAlwaysOnTopChanged();
|
NativeWindow::NotifyWindowAlwaysOnTopChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
ui::ZOrderLevel NativeWindowMac::GetZOrderLevel() {
|
ui::ZOrderLevel NativeWindowMac::GetZOrderLevel() const {
|
||||||
return widget()->GetZOrderLevel();
|
return widget()->GetZOrderLevel();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1033,7 +1033,7 @@ void NativeWindowMac::SetTitle(const std::string& title) {
|
||||||
[buttons_proxy_ redraw];
|
[buttons_proxy_ redraw];
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string NativeWindowMac::GetTitle() {
|
std::string NativeWindowMac::GetTitle() const {
|
||||||
return base::SysNSStringToUTF8([window_ title]);
|
return base::SysNSStringToUTF8([window_ title]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1048,7 +1048,7 @@ void NativeWindowMac::FlashFrame(bool flash) {
|
||||||
|
|
||||||
void NativeWindowMac::SetSkipTaskbar(bool skip) {}
|
void NativeWindowMac::SetSkipTaskbar(bool skip) {}
|
||||||
|
|
||||||
bool NativeWindowMac::IsExcludedFromShownWindowsMenu() {
|
bool NativeWindowMac::IsExcludedFromShownWindowsMenu() const {
|
||||||
NSWindow* window = GetNativeWindow().GetNativeNSWindow();
|
NSWindow* window = GetNativeWindow().GetNativeNSWindow();
|
||||||
return [window isExcludedFromWindowsMenu];
|
return [window isExcludedFromWindowsMenu];
|
||||||
}
|
}
|
||||||
|
@ -1154,7 +1154,7 @@ void NativeWindowMac::SetSimpleFullScreen(bool simple_fullscreen) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NativeWindowMac::IsSimpleFullScreen() {
|
bool NativeWindowMac::IsSimpleFullScreen() const {
|
||||||
return is_simple_fullscreen_;
|
return is_simple_fullscreen_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1185,7 +1185,7 @@ void NativeWindowMac::SetKiosk(bool kiosk) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NativeWindowMac::IsKiosk() {
|
bool NativeWindowMac::IsKiosk() const {
|
||||||
return is_kiosk_;
|
return is_kiosk_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1195,7 +1195,7 @@ void NativeWindowMac::SetBackgroundColor(SkColor color) {
|
||||||
[[[window_ contentView] layer] setBackgroundColor:cgcolor.get()];
|
[[[window_ contentView] layer] setBackgroundColor:cgcolor.get()];
|
||||||
}
|
}
|
||||||
|
|
||||||
SkColor NativeWindowMac::GetBackgroundColor() {
|
SkColor NativeWindowMac::GetBackgroundColor() const {
|
||||||
CGColorRef color = [[[window_ contentView] layer] backgroundColor];
|
CGColorRef color = [[[window_ contentView] layer] backgroundColor];
|
||||||
if (!color)
|
if (!color)
|
||||||
return SK_ColorTRANSPARENT;
|
return SK_ColorTRANSPARENT;
|
||||||
|
@ -1206,7 +1206,7 @@ void NativeWindowMac::SetHasShadow(bool has_shadow) {
|
||||||
[window_ setHasShadow:has_shadow];
|
[window_ setHasShadow:has_shadow];
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NativeWindowMac::HasShadow() {
|
bool NativeWindowMac::HasShadow() const {
|
||||||
return [window_ hasShadow];
|
return [window_ hasShadow];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1219,7 +1219,7 @@ void NativeWindowMac::SetOpacity(const double opacity) {
|
||||||
[window_ setAlphaValue:boundedOpacity];
|
[window_ setAlphaValue:boundedOpacity];
|
||||||
}
|
}
|
||||||
|
|
||||||
double NativeWindowMac::GetOpacity() {
|
double NativeWindowMac::GetOpacity() const {
|
||||||
return [window_ alphaValue];
|
return [window_ alphaValue];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1229,7 +1229,7 @@ void NativeWindowMac::SetRepresentedFilename(const std::string& filename) {
|
||||||
[buttons_proxy_ redraw];
|
[buttons_proxy_ redraw];
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string NativeWindowMac::GetRepresentedFilename() {
|
std::string NativeWindowMac::GetRepresentedFilename() const {
|
||||||
return base::SysNSStringToUTF8([window_ representedFilename]);
|
return base::SysNSStringToUTF8([window_ representedFilename]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1239,11 +1239,11 @@ void NativeWindowMac::SetDocumentEdited(bool edited) {
|
||||||
[buttons_proxy_ redraw];
|
[buttons_proxy_ redraw];
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NativeWindowMac::IsDocumentEdited() {
|
bool NativeWindowMac::IsDocumentEdited() const {
|
||||||
return [window_ isDocumentEdited];
|
return [window_ isDocumentEdited];
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NativeWindowMac::IsHiddenInMissionControl() {
|
bool NativeWindowMac::IsHiddenInMissionControl() const {
|
||||||
NSUInteger collectionBehavior = [window_ collectionBehavior];
|
NSUInteger collectionBehavior = [window_ collectionBehavior];
|
||||||
return collectionBehavior & NSWindowCollectionBehaviorTransient;
|
return collectionBehavior & NSWindowCollectionBehaviorTransient;
|
||||||
}
|
}
|
||||||
|
@ -1273,7 +1273,7 @@ void NativeWindowMac::SetFocusable(bool focusable) {
|
||||||
[window_ setDisableKeyOrMainWindow:!focusable];
|
[window_ setDisableKeyOrMainWindow:!focusable];
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NativeWindowMac::IsFocusable() {
|
bool NativeWindowMac::IsFocusable() const {
|
||||||
return ![window_ disableKeyOrMainWindow];
|
return ![window_ disableKeyOrMainWindow];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1380,7 +1380,7 @@ void NativeWindowMac::SetVisibleOnAllWorkspaces(bool visible,
|
||||||
NSWindowCollectionBehaviorFullScreenAuxiliary);
|
NSWindowCollectionBehaviorFullScreenAuxiliary);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NativeWindowMac::IsVisibleOnAllWorkspaces() {
|
bool NativeWindowMac::IsVisibleOnAllWorkspaces() const {
|
||||||
NSUInteger collectionBehavior = [window_ collectionBehavior];
|
NSUInteger collectionBehavior = [window_ collectionBehavior];
|
||||||
return collectionBehavior & NSWindowCollectionBehaviorCanJoinAllSpaces;
|
return collectionBehavior & NSWindowCollectionBehaviorCanJoinAllSpaces;
|
||||||
}
|
}
|
||||||
|
|
|
@ -502,7 +502,7 @@ void NativeWindowViews::Focus(bool focus) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NativeWindowViews::IsFocused() {
|
bool NativeWindowViews::IsFocused() const {
|
||||||
return widget()->IsActive();
|
return widget()->IsActive();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -562,7 +562,7 @@ void NativeWindowViews::Hide() {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NativeWindowViews::IsVisible() {
|
bool NativeWindowViews::IsVisible() const {
|
||||||
#if BUILDFLAG(IS_WIN)
|
#if BUILDFLAG(IS_WIN)
|
||||||
// widget()->IsVisible() calls ::IsWindowVisible, which returns non-zero if a
|
// widget()->IsVisible() calls ::IsWindowVisible, which returns non-zero if a
|
||||||
// window or any of its parent windows are visible. We want to only check the
|
// window or any of its parent windows are visible. We want to only check the
|
||||||
|
@ -576,7 +576,7 @@ bool NativeWindowViews::IsVisible() {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NativeWindowViews::IsEnabled() {
|
bool NativeWindowViews::IsEnabled() const {
|
||||||
#if BUILDFLAG(IS_WIN)
|
#if BUILDFLAG(IS_WIN)
|
||||||
return ::IsWindowEnabled(GetAcceleratedWidget());
|
return ::IsWindowEnabled(GetAcceleratedWidget());
|
||||||
#elif BUILDFLAG(IS_LINUX)
|
#elif BUILDFLAG(IS_LINUX)
|
||||||
|
@ -606,7 +606,7 @@ void NativeWindowViews::SetEnabled(bool enable) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NativeWindowViews::ShouldBeEnabled() {
|
bool NativeWindowViews::ShouldBeEnabled() const {
|
||||||
return is_enabled_ && (num_modal_children_ == 0);
|
return is_enabled_ && (num_modal_children_ == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -666,7 +666,7 @@ void NativeWindowViews::Unmaximize() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NativeWindowViews::IsMaximized() {
|
bool NativeWindowViews::IsMaximized() const {
|
||||||
if (widget()->IsMaximized()) {
|
if (widget()->IsMaximized()) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
|
@ -701,7 +701,7 @@ void NativeWindowViews::Restore() {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NativeWindowViews::IsMinimized() {
|
bool NativeWindowViews::IsMinimized() const {
|
||||||
return widget()->IsMinimized();
|
return widget()->IsMinimized();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -787,7 +787,7 @@ void NativeWindowViews::SetBounds(const gfx::Rect& bounds, bool animate) {
|
||||||
widget()->SetBounds(bounds);
|
widget()->SetBounds(bounds);
|
||||||
}
|
}
|
||||||
|
|
||||||
gfx::Rect NativeWindowViews::GetBounds() {
|
gfx::Rect NativeWindowViews::GetBounds() const {
|
||||||
#if BUILDFLAG(IS_WIN)
|
#if BUILDFLAG(IS_WIN)
|
||||||
if (IsMinimized())
|
if (IsMinimized())
|
||||||
return widget()->GetRestoredBounds();
|
return widget()->GetRestoredBounds();
|
||||||
|
@ -796,11 +796,11 @@ gfx::Rect NativeWindowViews::GetBounds() {
|
||||||
return widget()->GetWindowBoundsInScreen();
|
return widget()->GetWindowBoundsInScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
gfx::Rect NativeWindowViews::GetContentBounds() {
|
gfx::Rect NativeWindowViews::GetContentBounds() const {
|
||||||
return content_view() ? content_view()->GetBoundsInScreen() : gfx::Rect();
|
return content_view() ? content_view()->GetBoundsInScreen() : gfx::Rect();
|
||||||
}
|
}
|
||||||
|
|
||||||
gfx::Size NativeWindowViews::GetContentSize() {
|
gfx::Size NativeWindowViews::GetContentSize() const {
|
||||||
#if BUILDFLAG(IS_WIN)
|
#if BUILDFLAG(IS_WIN)
|
||||||
if (IsMinimized())
|
if (IsMinimized())
|
||||||
return NativeWindow::GetContentSize();
|
return NativeWindow::GetContentSize();
|
||||||
|
@ -809,7 +809,7 @@ gfx::Size NativeWindowViews::GetContentSize() {
|
||||||
return content_view() ? content_view()->size() : gfx::Size();
|
return content_view() ? content_view()->size() : gfx::Size();
|
||||||
}
|
}
|
||||||
|
|
||||||
gfx::Rect NativeWindowViews::GetNormalBounds() {
|
gfx::Rect NativeWindowViews::GetNormalBounds() const {
|
||||||
#if BUILDFLAG(IS_WIN)
|
#if BUILDFLAG(IS_WIN)
|
||||||
if (IsMaximized() && transparent())
|
if (IsMaximized() && transparent())
|
||||||
return restore_bounds_;
|
return restore_bounds_;
|
||||||
|
@ -923,7 +923,7 @@ void NativeWindowViews::MoveTop() {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NativeWindowViews::IsResizable() {
|
bool NativeWindowViews::IsResizable() const {
|
||||||
#if BUILDFLAG(IS_WIN)
|
#if BUILDFLAG(IS_WIN)
|
||||||
if (has_frame())
|
if (has_frame())
|
||||||
return ::GetWindowLong(GetAcceleratedWidget(), GWL_STYLE) & WS_THICKFRAME;
|
return ::GetWindowLong(GetAcceleratedWidget(), GWL_STYLE) & WS_THICKFRAME;
|
||||||
|
@ -945,7 +945,7 @@ void NativeWindowViews::SetMovable(bool movable) {
|
||||||
movable_ = movable;
|
movable_ = movable;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NativeWindowViews::IsMovable() {
|
bool NativeWindowViews::IsMovable() const {
|
||||||
#if BUILDFLAG(IS_WIN)
|
#if BUILDFLAG(IS_WIN)
|
||||||
return movable_;
|
return movable_;
|
||||||
#else
|
#else
|
||||||
|
@ -965,7 +965,7 @@ void NativeWindowViews::SetMinimizable(bool minimizable) {
|
||||||
minimizable_ = minimizable;
|
minimizable_ = minimizable;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NativeWindowViews::IsMinimizable() {
|
bool NativeWindowViews::IsMinimizable() const {
|
||||||
#if BUILDFLAG(IS_WIN)
|
#if BUILDFLAG(IS_WIN)
|
||||||
return ::GetWindowLong(GetAcceleratedWidget(), GWL_STYLE) & WS_MINIMIZEBOX;
|
return ::GetWindowLong(GetAcceleratedWidget(), GWL_STYLE) & WS_MINIMIZEBOX;
|
||||||
#else
|
#else
|
||||||
|
@ -985,7 +985,7 @@ void NativeWindowViews::SetMaximizable(bool maximizable) {
|
||||||
maximizable_ = maximizable;
|
maximizable_ = maximizable;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NativeWindowViews::IsMaximizable() {
|
bool NativeWindowViews::IsMaximizable() const {
|
||||||
#if BUILDFLAG(IS_WIN)
|
#if BUILDFLAG(IS_WIN)
|
||||||
return ::GetWindowLong(GetAcceleratedWidget(), GWL_STYLE) & WS_MAXIMIZEBOX;
|
return ::GetWindowLong(GetAcceleratedWidget(), GWL_STYLE) & WS_MAXIMIZEBOX;
|
||||||
#else
|
#else
|
||||||
|
@ -995,7 +995,7 @@ bool NativeWindowViews::IsMaximizable() {
|
||||||
|
|
||||||
void NativeWindowViews::SetExcludedFromShownWindowsMenu(bool excluded) {}
|
void NativeWindowViews::SetExcludedFromShownWindowsMenu(bool excluded) {}
|
||||||
|
|
||||||
bool NativeWindowViews::IsExcludedFromShownWindowsMenu() {
|
bool NativeWindowViews::IsExcludedFromShownWindowsMenu() const {
|
||||||
// return false on unsupported platforms
|
// return false on unsupported platforms
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1004,7 +1004,7 @@ void NativeWindowViews::SetFullScreenable(bool fullscreenable) {
|
||||||
fullscreenable_ = fullscreenable;
|
fullscreenable_ = fullscreenable;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NativeWindowViews::IsFullScreenable() {
|
bool NativeWindowViews::IsFullScreenable() const {
|
||||||
return fullscreenable_;
|
return fullscreenable_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1024,7 +1024,7 @@ void NativeWindowViews::SetClosable(bool closable) {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NativeWindowViews::IsClosable() {
|
bool NativeWindowViews::IsClosable() const {
|
||||||
#if BUILDFLAG(IS_WIN)
|
#if BUILDFLAG(IS_WIN)
|
||||||
HMENU menu = GetSystemMenu(GetAcceleratedWidget(), false);
|
HMENU menu = GetSystemMenu(GetAcceleratedWidget(), false);
|
||||||
MENUITEMINFO info;
|
MENUITEMINFO info;
|
||||||
|
@ -1065,7 +1065,7 @@ void NativeWindowViews::SetAlwaysOnTop(ui::ZOrderLevel z_order,
|
||||||
NativeWindow::NotifyWindowAlwaysOnTopChanged();
|
NativeWindow::NotifyWindowAlwaysOnTopChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
ui::ZOrderLevel NativeWindowViews::GetZOrderLevel() {
|
ui::ZOrderLevel NativeWindowViews::GetZOrderLevel() const {
|
||||||
return widget()->GetZOrderLevel();
|
return widget()->GetZOrderLevel();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1082,7 +1082,7 @@ void NativeWindowViews::SetTitle(const std::string& title) {
|
||||||
widget()->UpdateWindowTitle();
|
widget()->UpdateWindowTitle();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string NativeWindowViews::GetTitle() {
|
std::string NativeWindowViews::GetTitle() const {
|
||||||
return title_;
|
return title_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1123,7 +1123,7 @@ void NativeWindowViews::SetSimpleFullScreen(bool simple_fullscreen) {
|
||||||
SetFullScreen(simple_fullscreen);
|
SetFullScreen(simple_fullscreen);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NativeWindowViews::IsSimpleFullScreen() {
|
bool NativeWindowViews::IsSimpleFullScreen() const {
|
||||||
return IsFullscreen();
|
return IsFullscreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1131,7 +1131,7 @@ void NativeWindowViews::SetKiosk(bool kiosk) {
|
||||||
SetFullScreen(kiosk);
|
SetFullScreen(kiosk);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NativeWindowViews::IsKiosk() {
|
bool NativeWindowViews::IsKiosk() const {
|
||||||
return IsFullscreen();
|
return IsFullscreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1143,7 +1143,7 @@ bool NativeWindowViews::IsTabletMode() const {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
SkColor NativeWindowViews::GetBackgroundColor() {
|
SkColor NativeWindowViews::GetBackgroundColor() const {
|
||||||
auto* background = root_view_.background();
|
auto* background = root_view_.background();
|
||||||
if (!background)
|
if (!background)
|
||||||
return SK_ColorTRANSPARENT;
|
return SK_ColorTRANSPARENT;
|
||||||
|
@ -1172,7 +1172,7 @@ void NativeWindowViews::SetHasShadow(bool has_shadow) {
|
||||||
: wm::kShadowElevationNone);
|
: wm::kShadowElevationNone);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NativeWindowViews::HasShadow() {
|
bool NativeWindowViews::HasShadow() const {
|
||||||
return GetNativeWindow()->GetProperty(wm::kShadowElevationKey) !=
|
return GetNativeWindow()->GetProperty(wm::kShadowElevationKey) !=
|
||||||
wm::kShadowElevationNone;
|
wm::kShadowElevationNone;
|
||||||
}
|
}
|
||||||
|
@ -1194,7 +1194,7 @@ void NativeWindowViews::SetOpacity(const double opacity) {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
double NativeWindowViews::GetOpacity() {
|
double NativeWindowViews::GetOpacity() const {
|
||||||
return opacity_;
|
return opacity_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1271,7 +1271,7 @@ void NativeWindowViews::SetFocusable(bool focusable) {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NativeWindowViews::IsFocusable() {
|
bool NativeWindowViews::IsFocusable() const {
|
||||||
bool can_activate = widget()->widget_delegate()->CanActivate();
|
bool can_activate = widget()->widget_delegate()->CanActivate();
|
||||||
#if BUILDFLAG(IS_WIN)
|
#if BUILDFLAG(IS_WIN)
|
||||||
LONG ex_style = ::GetWindowLong(GetAcceleratedWidget(), GWL_EXSTYLE);
|
LONG ex_style = ::GetWindowLong(GetAcceleratedWidget(), GWL_EXSTYLE);
|
||||||
|
@ -1404,7 +1404,7 @@ void NativeWindowViews::SetAutoHideMenuBar(bool auto_hide) {
|
||||||
root_view_.SetAutoHideMenuBar(auto_hide);
|
root_view_.SetAutoHideMenuBar(auto_hide);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NativeWindowViews::IsMenuBarAutoHide() {
|
bool NativeWindowViews::IsMenuBarAutoHide() const {
|
||||||
return root_view_.IsMenuBarAutoHide();
|
return root_view_.IsMenuBarAutoHide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1412,7 +1412,7 @@ void NativeWindowViews::SetMenuBarVisibility(bool visible) {
|
||||||
root_view_.SetMenuBarVisibility(visible);
|
root_view_.SetMenuBarVisibility(visible);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NativeWindowViews::IsMenuBarVisible() {
|
bool NativeWindowViews::IsMenuBarVisible() const {
|
||||||
return root_view_.IsMenuBarVisible();
|
return root_view_.IsMenuBarVisible();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1454,7 +1454,7 @@ void NativeWindowViews::SetVisibleOnAllWorkspaces(
|
||||||
widget()->SetVisibleOnAllWorkspaces(visible);
|
widget()->SetVisibleOnAllWorkspaces(visible);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NativeWindowViews::IsVisibleOnAllWorkspaces() {
|
bool NativeWindowViews::IsVisibleOnAllWorkspaces() const {
|
||||||
#if BUILDFLAG(IS_LINUX)
|
#if BUILDFLAG(IS_LINUX)
|
||||||
if (IsX11()) {
|
if (IsX11()) {
|
||||||
// Use the presence/absence of _NET_WM_STATE_STICKY in _NET_WM_STATE to
|
// Use the presence/absence of _NET_WM_STATE_STICKY in _NET_WM_STATE to
|
||||||
|
|
|
@ -49,27 +49,27 @@ class NativeWindowViews : public NativeWindow,
|
||||||
void Close() override;
|
void Close() override;
|
||||||
void CloseImmediately() override;
|
void CloseImmediately() override;
|
||||||
void Focus(bool focus) override;
|
void Focus(bool focus) override;
|
||||||
bool IsFocused() override;
|
bool IsFocused() const override;
|
||||||
void Show() override;
|
void Show() override;
|
||||||
void ShowInactive() override;
|
void ShowInactive() override;
|
||||||
void Hide() override;
|
void Hide() override;
|
||||||
bool IsVisible() override;
|
bool IsVisible() const override;
|
||||||
bool IsEnabled() override;
|
bool IsEnabled() const override;
|
||||||
void SetEnabled(bool enable) override;
|
void SetEnabled(bool enable) override;
|
||||||
void Maximize() override;
|
void Maximize() override;
|
||||||
void Unmaximize() override;
|
void Unmaximize() override;
|
||||||
bool IsMaximized() override;
|
bool IsMaximized() const override;
|
||||||
void Minimize() override;
|
void Minimize() override;
|
||||||
void Restore() override;
|
void Restore() override;
|
||||||
bool IsMinimized() override;
|
bool IsMinimized() const override;
|
||||||
void SetFullScreen(bool fullscreen) override;
|
void SetFullScreen(bool fullscreen) override;
|
||||||
bool IsFullscreen() const override;
|
bool IsFullscreen() const override;
|
||||||
void SetBounds(const gfx::Rect& bounds, bool animate) override;
|
void SetBounds(const gfx::Rect& bounds, bool animate) override;
|
||||||
gfx::Rect GetBounds() override;
|
gfx::Rect GetBounds() const override;
|
||||||
gfx::Rect GetContentBounds() override;
|
gfx::Rect GetContentBounds() const override;
|
||||||
gfx::Size GetContentSize() override;
|
gfx::Size GetContentSize() const override;
|
||||||
gfx::Rect GetNormalBounds() override;
|
gfx::Rect GetNormalBounds() const override;
|
||||||
SkColor GetBackgroundColor() override;
|
SkColor GetBackgroundColor() const override;
|
||||||
void SetContentSizeConstraints(
|
void SetContentSizeConstraints(
|
||||||
const extensions::SizeConstraints& size_constraints) override;
|
const extensions::SizeConstraints& size_constraints) override;
|
||||||
#if BUILDFLAG(IS_WIN)
|
#if BUILDFLAG(IS_WIN)
|
||||||
|
@ -78,45 +78,45 @@ class NativeWindowViews : public NativeWindow,
|
||||||
void SetResizable(bool resizable) override;
|
void SetResizable(bool resizable) override;
|
||||||
bool MoveAbove(const std::string& sourceId) override;
|
bool MoveAbove(const std::string& sourceId) override;
|
||||||
void MoveTop() override;
|
void MoveTop() override;
|
||||||
bool IsResizable() override;
|
bool IsResizable() const override;
|
||||||
void SetAspectRatio(double aspect_ratio,
|
void SetAspectRatio(double aspect_ratio,
|
||||||
const gfx::Size& extra_size) override;
|
const gfx::Size& extra_size) override;
|
||||||
void SetMovable(bool movable) override;
|
void SetMovable(bool movable) override;
|
||||||
bool IsMovable() override;
|
bool IsMovable() const override;
|
||||||
void SetMinimizable(bool minimizable) override;
|
void SetMinimizable(bool minimizable) override;
|
||||||
bool IsMinimizable() override;
|
bool IsMinimizable() const override;
|
||||||
void SetMaximizable(bool maximizable) override;
|
void SetMaximizable(bool maximizable) override;
|
||||||
bool IsMaximizable() override;
|
bool IsMaximizable() const override;
|
||||||
void SetFullScreenable(bool fullscreenable) override;
|
void SetFullScreenable(bool fullscreenable) override;
|
||||||
bool IsFullScreenable() override;
|
bool IsFullScreenable() const override;
|
||||||
void SetClosable(bool closable) override;
|
void SetClosable(bool closable) override;
|
||||||
bool IsClosable() override;
|
bool IsClosable() const override;
|
||||||
void SetAlwaysOnTop(ui::ZOrderLevel z_order,
|
void SetAlwaysOnTop(ui::ZOrderLevel z_order,
|
||||||
const std::string& level,
|
const std::string& level,
|
||||||
int relativeLevel) override;
|
int relativeLevel) override;
|
||||||
ui::ZOrderLevel GetZOrderLevel() override;
|
ui::ZOrderLevel GetZOrderLevel() const override;
|
||||||
void Center() override;
|
void Center() override;
|
||||||
void Invalidate() override;
|
void Invalidate() override;
|
||||||
void SetTitle(const std::string& title) override;
|
void SetTitle(const std::string& title) override;
|
||||||
std::string GetTitle() override;
|
std::string GetTitle() const override;
|
||||||
void FlashFrame(bool flash) override;
|
void FlashFrame(bool flash) override;
|
||||||
void SetSkipTaskbar(bool skip) override;
|
void SetSkipTaskbar(bool skip) override;
|
||||||
void SetExcludedFromShownWindowsMenu(bool excluded) override;
|
void SetExcludedFromShownWindowsMenu(bool excluded) override;
|
||||||
bool IsExcludedFromShownWindowsMenu() override;
|
bool IsExcludedFromShownWindowsMenu() const override;
|
||||||
void SetSimpleFullScreen(bool simple_fullscreen) override;
|
void SetSimpleFullScreen(bool simple_fullscreen) override;
|
||||||
bool IsSimpleFullScreen() override;
|
bool IsSimpleFullScreen() const override;
|
||||||
void SetKiosk(bool kiosk) override;
|
void SetKiosk(bool kiosk) override;
|
||||||
bool IsKiosk() override;
|
bool IsKiosk() const override;
|
||||||
bool IsTabletMode() const override;
|
bool IsTabletMode() const override;
|
||||||
void SetBackgroundColor(SkColor color) override;
|
void SetBackgroundColor(SkColor color) override;
|
||||||
void SetHasShadow(bool has_shadow) override;
|
void SetHasShadow(bool has_shadow) override;
|
||||||
bool HasShadow() override;
|
bool HasShadow() const override;
|
||||||
void SetOpacity(const double opacity) override;
|
void SetOpacity(const double opacity) override;
|
||||||
double GetOpacity() override;
|
double GetOpacity() const override;
|
||||||
void SetIgnoreMouseEvents(bool ignore, bool forward) override;
|
void SetIgnoreMouseEvents(bool ignore, bool forward) override;
|
||||||
void SetContentProtection(bool enable) override;
|
void SetContentProtection(bool enable) override;
|
||||||
void SetFocusable(bool focusable) override;
|
void SetFocusable(bool focusable) override;
|
||||||
bool IsFocusable() override;
|
bool IsFocusable() const override;
|
||||||
void SetMenu(ElectronMenuModel* menu_model) override;
|
void SetMenu(ElectronMenuModel* menu_model) override;
|
||||||
void SetParentWindow(NativeWindow* parent) override;
|
void SetParentWindow(NativeWindow* parent) override;
|
||||||
gfx::NativeView GetNativeView() const override;
|
gfx::NativeView GetNativeView() const override;
|
||||||
|
@ -125,16 +125,16 @@ class NativeWindowViews : public NativeWindow,
|
||||||
const std::string& description) override;
|
const std::string& description) override;
|
||||||
void SetProgressBar(double progress, const ProgressState state) override;
|
void SetProgressBar(double progress, const ProgressState state) override;
|
||||||
void SetAutoHideMenuBar(bool auto_hide) override;
|
void SetAutoHideMenuBar(bool auto_hide) override;
|
||||||
bool IsMenuBarAutoHide() override;
|
bool IsMenuBarAutoHide() const override;
|
||||||
void SetMenuBarVisibility(bool visible) override;
|
void SetMenuBarVisibility(bool visible) override;
|
||||||
bool IsMenuBarVisible() override;
|
bool IsMenuBarVisible() const override;
|
||||||
void SetBackgroundMaterial(const std::string& type) override;
|
void SetBackgroundMaterial(const std::string& type) override;
|
||||||
|
|
||||||
void SetVisibleOnAllWorkspaces(bool visible,
|
void SetVisibleOnAllWorkspaces(bool visible,
|
||||||
bool visibleOnFullScreen,
|
bool visibleOnFullScreen,
|
||||||
bool skipTransformProcessType) override;
|
bool skipTransformProcessType) override;
|
||||||
|
|
||||||
bool IsVisibleOnAllWorkspaces() override;
|
bool IsVisibleOnAllWorkspaces() const override;
|
||||||
|
|
||||||
void SetGTKDarkThemeEnabled(bool use_dark_theme) override;
|
void SetGTKDarkThemeEnabled(bool use_dark_theme) override;
|
||||||
|
|
||||||
|
@ -226,7 +226,7 @@ class NativeWindowViews : public NativeWindow,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Enable/disable:
|
// Enable/disable:
|
||||||
bool ShouldBeEnabled();
|
bool ShouldBeEnabled() const;
|
||||||
void SetEnabledInternal(bool enabled);
|
void SetEnabledInternal(bool enabled);
|
||||||
|
|
||||||
// NativeWindow:
|
// NativeWindow:
|
||||||
|
|
Loading…
Reference in a new issue