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

Side by Side Diff: chrome/browser/ui/panels/panel_browser_frame_view.cc

Issue 8356028: Add shortcut to show avatar menu (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix typo Created 9 years, 2 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_frame_view.h" 5 #include "chrome/browser/ui/panels/panel_browser_frame_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/themes/theme_service.h" 10 #include "chrome/browser/themes/theme_service.h"
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 // This is not needed since we do not show tab strip for the panel. 301 // This is not needed since we do not show tab strip for the panel.
302 return 0; 302 return 0;
303 } 303 }
304 304
305 void PanelBrowserFrameView::UpdateThrobber(bool running) { 305 void PanelBrowserFrameView::UpdateThrobber(bool running) {
306 // Tells the title icon to update the throbber when we need to show the 306 // Tells the title icon to update the throbber when we need to show the
307 // animation to indicate we're still loading. 307 // animation to indicate we're still loading.
308 title_icon_->Update(); 308 title_icon_->Update();
309 } 309 }
310 310
311 AvatarMenuButton* PanelBrowserFrameView::GetAvatarMenuButton() OVERRIDE {
312 return NULL;
313 }
314
311 gfx::Rect PanelBrowserFrameView::GetBoundsForClientView() const { 315 gfx::Rect PanelBrowserFrameView::GetBoundsForClientView() const {
312 return client_view_bounds_; 316 return client_view_bounds_;
313 } 317 }
314 318
315 gfx::Rect PanelBrowserFrameView::GetWindowBoundsForClientBounds( 319 gfx::Rect PanelBrowserFrameView::GetWindowBoundsForClientBounds(
316 const gfx::Rect& client_bounds) const { 320 const gfx::Rect& client_bounds) const {
317 int top_height = NonClientTopBorderHeight(); 321 int top_height = NonClientTopBorderHeight();
318 int border_thickness = NonClientBorderThickness(); 322 int border_thickness = NonClientBorderThickness();
319 return gfx::Rect(std::max(0, client_bounds.x() - border_thickness), 323 return gfx::Rect(std::max(0, client_bounds.x() - border_thickness),
320 std::max(0, client_bounds.y() - top_height), 324 std::max(0, client_bounds.y() - top_height),
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
743 747
744 settings_menu_model_.reset( 748 settings_menu_model_.reset(
745 new PanelSettingsMenuModel(browser_view_->panel())); 749 new PanelSettingsMenuModel(browser_view_->panel()));
746 settings_menu_adapter_.reset( 750 settings_menu_adapter_.reset(
747 new views::MenuModelAdapter(settings_menu_model_.get())); 751 new views::MenuModelAdapter(settings_menu_model_.get()));
748 settings_menu_ = new views::MenuItemView(settings_menu_adapter_.get()); 752 settings_menu_ = new views::MenuItemView(settings_menu_adapter_.get());
749 settings_menu_adapter_->BuildMenu(settings_menu_); 753 settings_menu_adapter_->BuildMenu(settings_menu_);
750 settings_menu_runner_.reset(new views::MenuRunner(settings_menu_)); 754 settings_menu_runner_.reset(new views::MenuRunner(settings_menu_));
751 return true; 755 return true;
752 } 756 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698