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

Side by Side Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 10736028: Refactor browser window zoom handling and enable zoom icon on all platforms. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix mac Created 8 years, 5 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/views/frame/browser_view.h" 5 #include "chrome/browser/ui/views/frame/browser_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 // Loads are now complete, update the state if a task was scheduled. 692 // Loads are now complete, update the state if a task was scheduled.
693 LoadingAnimationCallback(); 693 LoadingAnimationCallback();
694 } 694 }
695 } 695 }
696 } 696 }
697 697
698 void BrowserView::SetStarredState(bool is_starred) { 698 void BrowserView::SetStarredState(bool is_starred) {
699 GetLocationBarView()->SetStarToggled(is_starred); 699 GetLocationBarView()->SetStarToggled(is_starred);
700 } 700 }
701 701
702 void BrowserView::SetZoomIconState( 702 void BrowserView::ZoomChangedForActiveTab(bool can_show_bubble) {
703 ZoomController::ZoomIconState zoom_icon_state) { 703 GetLocationBarView()->ZoomChangedForActiveTab(can_show_bubble);
704 GetLocationBarView()->SetZoomIconState(zoom_icon_state);
705 }
706 704
707 void BrowserView::SetZoomIconTooltipPercent(int zoom_percent) { 705 // TODO(dbeam): show a zoom bubble when the wrench menu's not showing.
708 GetLocationBarView()->SetZoomIconTooltipPercent(zoom_percent);
709 }
710
711 void BrowserView::ShowZoomBubble(int zoom_percent) {
712 GetLocationBarView()->ShowZoomBubble(zoom_percent);
713 } 706 }
714 707
715 gfx::Rect BrowserView::GetRestoredBounds() const { 708 gfx::Rect BrowserView::GetRestoredBounds() const {
716 return frame_->GetRestoredBounds(); 709 return frame_->GetRestoredBounds();
717 } 710 }
718 711
719 gfx::Rect BrowserView::GetBounds() const { 712 gfx::Rect BrowserView::GetBounds() const {
720 return frame_->GetWindowBoundsInScreen(); 713 return frame_->GetWindowBoundsInScreen();
721 } 714 }
722 715
(...skipping 1860 matching lines...) Expand 10 before | Expand all | Expand 10 after
2583 if (contents && contents->GetContentNativeView() && 2576 if (contents && contents->GetContentNativeView() &&
2584 contents->GetContentNativeView()->HasFocus()) { 2577 contents->GetContentNativeView()->HasFocus()) {
2585 (contents->GetRenderViewHost()->*method)(); 2578 (contents->GetRenderViewHost()->*method)();
2586 return true; 2579 return true;
2587 } 2580 }
2588 #elif defined(OS_WIN) 2581 #elif defined(OS_WIN)
2589 // TODO(yusukes): Support non-Aura Windows. 2582 // TODO(yusukes): Support non-Aura Windows.
2590 #endif 2583 #endif
2591 return false; 2584 return false;
2592 } 2585 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698