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

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

Issue 7011015: Show "About panel" bubble on Windows. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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 "chrome/browser/themes/theme_service.h" 7 #include "chrome/browser/themes/theme_service.h"
8 #include "chrome/browser/ui/panels/about_panel_bubble.h"
8 #include "chrome/browser/ui/panels/panel.h" 9 #include "chrome/browser/ui/panels/panel.h"
9 #include "chrome/browser/ui/panels/panel_browser_view.h" 10 #include "chrome/browser/ui/panels/panel_browser_view.h"
10 #include "chrome/browser/ui/panels/panel_manager.h" 11 #include "chrome/browser/ui/panels/panel_manager.h"
11 #include "content/browser/tab_contents/tab_contents.h" 12 #include "content/browser/tab_contents/tab_contents.h"
12 #include "grit/app_resources.h" 13 #include "grit/app_resources.h"
13 #include "grit/generated_resources.h" 14 #include "grit/generated_resources.h"
14 #include "grit/theme_resources.h" 15 #include "grit/theme_resources.h"
15 #include "grit/theme_resources_standard.h" 16 #include "grit/theme_resources_standard.h"
16 #include "third_party/skia/include/effects/SkGradientShader.h" 17 #include "third_party/skia/include/effects/SkGradientShader.h"
17 #include "ui/base/accessibility/accessible_view_state.h" 18 #include "ui/base/accessibility/accessible_view_state.h"
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 void PanelBrowserFrameView::OnMouseCaptureLost() { 346 void PanelBrowserFrameView::OnMouseCaptureLost() {
346 if (browser_view_->OnTitleBarMouseCaptureLost()) 347 if (browser_view_->OnTitleBarMouseCaptureLost())
347 return; 348 return;
348 BrowserNonClientFrameView::OnMouseCaptureLost(); 349 BrowserNonClientFrameView::OnMouseCaptureLost();
349 } 350 }
350 351
351 void PanelBrowserFrameView::ButtonPressed(views::Button* sender, 352 void PanelBrowserFrameView::ButtonPressed(views::Button* sender,
352 const views::Event& event) { 353 const views::Event& event) {
353 if (sender == close_button_) 354 if (sender == close_button_)
354 frame_->Close(); 355 frame_->Close();
356 else if (sender == info_button_) {
357 gfx::Point origin(info_button_->bounds().origin());
358 views::View::ConvertPointToScreen(this, &origin);
359 AboutPanelBubble::Show(
360 GetWidget(),
361 gfx::Rect(origin, info_button_->bounds().size()),
362 BubbleBorder::BOTTOM_RIGHT,
363 GetFaviconForTabIconView(),
364 browser_view_->browser());
365 }
355 } 366 }
356 367
357 bool PanelBrowserFrameView::ShouldTabIconViewAnimate() const { 368 bool PanelBrowserFrameView::ShouldTabIconViewAnimate() const {
358 // This function is queried during the creation of the window as the 369 // This function is queried during the creation of the window as the
359 // TabIconView we host is initialized, so we need to NULL check the selected 370 // TabIconView we host is initialized, so we need to NULL check the selected
360 // TabContents because in this condition there is not yet a selected tab. 371 // TabContents because in this condition there is not yet a selected tab.
361 TabContents* current_tab = browser_view_->GetSelectedTabContents(); 372 TabContents* current_tab = browser_view_->GetSelectedTabContents();
362 return current_tab ? current_tab->is_loading() : false; 373 return current_tab ? current_tab->is_loading() : false;
363 } 374 }
364 375
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 } 485 }
475 486
476 void PanelBrowserFrameView::UpdateTitleBar() { 487 void PanelBrowserFrameView::UpdateTitleBar() {
477 title_label_->SetText( 488 title_label_->SetText(
478 frame_->window_delegate()->GetWindowTitle()); 489 frame_->window_delegate()->GetWindowTitle());
479 } 490 }
480 491
481 void PanelBrowserFrameView::OnActivationChanged(bool active) { 492 void PanelBrowserFrameView::OnActivationChanged(bool active) {
482 SchedulePaint(); 493 SchedulePaint();
483 } 494 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/about_panel_bubble.cc ('k') | chrome/browser/ui/panels/panel_browser_view_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698