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

Side by Side Diff: chrome/browser/ui/panels/panel_browser_window_cocoa.mm

Issue 10483010: Change the visual appearance of panel on GTK per new UI design. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/panels/panel_browser_window_cocoa.h" 5 #include "chrome/browser/ui/panels/panel_browser_window_cocoa.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/browser/ui/browser.h" 8 #include "chrome/browser/ui/browser.h"
9 #include "chrome/browser/ui/browser_list.h" 9 #include "chrome/browser/ui/browser_list.h"
10 #import "chrome/browser/ui/cocoa/browser_window_utils.h" 10 #import "chrome/browser/ui/cocoa/browser_window_utils.h"
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 const gfx::Point& mouse_location, panel::ClickModifier modifier) OVERRIDE; 357 const gfx::Point& mouse_location, panel::ClickModifier modifier) OVERRIDE;
358 virtual void ReleaseMouseButtonTitlebar( 358 virtual void ReleaseMouseButtonTitlebar(
359 panel::ClickModifier modifier) OVERRIDE; 359 panel::ClickModifier modifier) OVERRIDE;
360 virtual void DragTitlebar(const gfx::Point& mouse_location) OVERRIDE; 360 virtual void DragTitlebar(const gfx::Point& mouse_location) OVERRIDE;
361 virtual void CancelDragTitlebar() OVERRIDE; 361 virtual void CancelDragTitlebar() OVERRIDE;
362 virtual void FinishDragTitlebar() OVERRIDE; 362 virtual void FinishDragTitlebar() OVERRIDE;
363 virtual bool VerifyDrawingAttention() const OVERRIDE; 363 virtual bool VerifyDrawingAttention() const OVERRIDE;
364 virtual bool VerifyActiveState(bool is_active) OVERRIDE; 364 virtual bool VerifyActiveState(bool is_active) OVERRIDE;
365 virtual bool IsWindowSizeKnown() const OVERRIDE; 365 virtual bool IsWindowSizeKnown() const OVERRIDE;
366 virtual bool IsAnimatingBounds() const OVERRIDE; 366 virtual bool IsAnimatingBounds() const OVERRIDE;
367 virtual bool IsButtonVisible(TitlebarButtonType button_type) const OVERRIDE; 367 virtual bool IsButtonVisible(
368 panel::TitlebarButtonType button_type) const OVERRIDE;
368 369
369 private: 370 private:
370 PanelTitlebarViewCocoa* titlebar() const; 371 PanelTitlebarViewCocoa* titlebar() const;
371 // Weak, assumed always to outlive this test API object. 372 // Weak, assumed always to outlive this test API object.
372 PanelBrowserWindowCocoa* native_panel_window_; 373 PanelBrowserWindowCocoa* native_panel_window_;
373 }; 374 };
374 375
375 // static 376 // static
376 NativePanelTesting* NativePanelTesting::Create(NativePanel* native_panel) { 377 NativePanelTesting* NativePanelTesting::Create(NativePanel* native_panel) {
377 return new NativePanelTestingCocoa(native_panel); 378 return new NativePanelTestingCocoa(native_panel);
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 432
432 bool NativePanelTestingCocoa::IsWindowSizeKnown() const { 433 bool NativePanelTestingCocoa::IsWindowSizeKnown() const {
433 return true; 434 return true;
434 } 435 }
435 436
436 bool NativePanelTestingCocoa::IsAnimatingBounds() const { 437 bool NativePanelTestingCocoa::IsAnimatingBounds() const {
437 return [native_panel_window_->controller_ isAnimatingBounds]; 438 return [native_panel_window_->controller_ isAnimatingBounds];
438 } 439 }
439 440
440 bool NativePanelTestingCocoa::IsButtonVisible( 441 bool NativePanelTestingCocoa::IsButtonVisible(
441 TitlebarButtonType button_type) const { 442 panel::TitlebarButtonType button_type) const {
442 switch (button_type) { 443 switch (button_type) {
443 case CLOSE_BUTTON: 444 case panel::CLOSE_BUTTON:
444 return ![[titlebar() closeButton] isHidden]; 445 return ![[titlebar() closeButton] isHidden];
445 case MINIMIZE_BUTTON: 446 case panel::MINIMIZE_BUTTON:
446 return ![[titlebar() minimizeButton] isHidden]; 447 return ![[titlebar() minimizeButton] isHidden];
447 case RESTORE_BUTTON: 448 case panel::RESTORE_BUTTON:
448 return ![[titlebar() restoreButton] isHidden]; 449 return ![[titlebar() restoreButton] isHidden];
449 default: 450 default:
450 NOTREACHED(); 451 NOTREACHED();
451 } 452 }
452 return false; 453 return false;
453 } 454 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698