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

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

Issue 9835013: Ash: Don't show window icon or title for app windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move to BrowserView, add line Created 8 years, 9 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
« no previous file with comments | « chrome/browser/ui/views/frame/browser_non_client_frame_view_aura.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1446 matching lines...) Expand 10 before | Expand all | Expand 10 after
1457 return GetWindowTitle(); 1457 return GetWindowTitle();
1458 } 1458 }
1459 1459
1460 views::View* BrowserView::GetInitiallyFocusedView() { 1460 views::View* BrowserView::GetInitiallyFocusedView() {
1461 // We set the frame not focus on creation so this should never be called. 1461 // We set the frame not focus on creation so this should never be called.
1462 NOTREACHED(); 1462 NOTREACHED();
1463 return NULL; 1463 return NULL;
1464 } 1464 }
1465 1465
1466 bool BrowserView::ShouldShowWindowTitle() const { 1466 bool BrowserView::ShouldShowWindowTitle() const {
1467 #if defined(USE_ASH)
1468 // For Ash only, app windows do not show a title. crbug.com/119411
1469 if (browser_->is_app())
1470 return false;
1471 #endif
1467 return browser_->SupportsWindowFeature(Browser::FEATURE_TITLEBAR); 1472 return browser_->SupportsWindowFeature(Browser::FEATURE_TITLEBAR);
1468 } 1473 }
1469 1474
1470 SkBitmap BrowserView::GetWindowAppIcon() { 1475 SkBitmap BrowserView::GetWindowAppIcon() {
1471 if (browser_->is_app()) { 1476 if (browser_->is_app()) {
1472 TabContentsWrapper* contents = browser_->GetSelectedTabContentsWrapper(); 1477 TabContentsWrapper* contents = browser_->GetSelectedTabContentsWrapper();
1473 if (contents && contents->extension_tab_helper()->GetExtensionAppIcon()) 1478 if (contents && contents->extension_tab_helper()->GetExtensionAppIcon())
1474 return *contents->extension_tab_helper()->GetExtensionAppIcon(); 1479 return *contents->extension_tab_helper()->GetExtensionAppIcon();
1475 } 1480 }
1476 1481
1477 return GetWindowIcon(); 1482 return GetWindowIcon();
1478 } 1483 }
1479 1484
1480 SkBitmap BrowserView::GetWindowIcon() { 1485 SkBitmap BrowserView::GetWindowIcon() {
1481 if (browser_->is_app()) 1486 if (browser_->is_app())
1482 return browser_->GetCurrentPageIcon(); 1487 return browser_->GetCurrentPageIcon();
1483 return SkBitmap(); 1488 return SkBitmap();
1484 } 1489 }
1485 1490
1486 bool BrowserView::ShouldShowWindowIcon() const { 1491 bool BrowserView::ShouldShowWindowIcon() const {
1492 #if defined(USE_ASH)
1493 // For Ash only, app windows do not show an icon. crbug.com/119411
1494 if (browser_->is_app())
1495 return false;
1496 #endif
1487 return browser_->SupportsWindowFeature(Browser::FEATURE_TITLEBAR); 1497 return browser_->SupportsWindowFeature(Browser::FEATURE_TITLEBAR);
1488 } 1498 }
1489 1499
1490 bool BrowserView::ExecuteWindowsCommand(int command_id) { 1500 bool BrowserView::ExecuteWindowsCommand(int command_id) {
1491 // This function handles WM_SYSCOMMAND, WM_APPCOMMAND, and WM_COMMAND. 1501 // This function handles WM_SYSCOMMAND, WM_APPCOMMAND, and WM_COMMAND.
1492 #if defined(OS_WIN) && !defined(USE_AURA) 1502 #if defined(OS_WIN) && !defined(USE_AURA)
1493 if (command_id == IDC_DEBUG_FRAME_TOGGLE) 1503 if (command_id == IDC_DEBUG_FRAME_TOGGLE)
1494 GetWidget()->DebugToggleFrameType(); 1504 GetWidget()->DebugToggleFrameType();
1495 #endif 1505 #endif
1496 // Translate WM_APPCOMMAND command ids into a command id that the browser 1506 // Translate WM_APPCOMMAND command ids into a command id that the browser
(...skipping 963 matching lines...) Expand 10 before | Expand all | Expand 10 after
2460 return; 2470 return;
2461 2471
2462 PasswordGenerationBubbleView* bubble = 2472 PasswordGenerationBubbleView* bubble =
2463 new PasswordGenerationBubbleView(bounds, 2473 new PasswordGenerationBubbleView(bounds,
2464 this, 2474 this,
2465 web_contents->GetRenderViewHost()); 2475 web_contents->GetRenderViewHost());
2466 browser::CreateViewsBubble(bubble); 2476 browser::CreateViewsBubble(bubble);
2467 bubble->SetAlignment(views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE); 2477 bubble->SetAlignment(views::BubbleBorder::ALIGN_EDGE_TO_ANCHOR_EDGE);
2468 bubble->Show(); 2478 bubble->Show();
2469 } 2479 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_non_client_frame_view_aura.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698