OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 2465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2476 return chrome::kNTPBookmarkBarHeight - | 2476 return chrome::kNTPBookmarkBarHeight - |
2477 bookmark_bar_view_->GetFullyDetachedToolbarOverlap(); | 2477 bookmark_bar_view_->GetFullyDetachedToolbarOverlap(); |
2478 } | 2478 } |
2479 | 2479 |
2480 void BrowserView::ExecuteExtensionCommand( | 2480 void BrowserView::ExecuteExtensionCommand( |
2481 const extensions::Extension* extension, | 2481 const extensions::Extension* extension, |
2482 const extensions::Command& command) { | 2482 const extensions::Command& command) { |
2483 toolbar_->ExecuteExtensionCommand(extension, command); | 2483 toolbar_->ExecuteExtensionCommand(extension, command); |
2484 } | 2484 } |
2485 | 2485 |
| 2486 bool BrowserView::IsExtensionCommandRegistered( |
| 2487 const ui::Accelerator& accelerator) { |
| 2488 return toolbar_->IsExtensionCommandRegistered(accelerator); |
| 2489 } |
| 2490 |
2486 void BrowserView::DoCutCopyPaste(void (WebContents::*method)(), | 2491 void BrowserView::DoCutCopyPaste(void (WebContents::*method)(), |
2487 int command_id) { | 2492 int command_id) { |
2488 WebContents* contents = browser_->tab_strip_model()->GetActiveWebContents(); | 2493 WebContents* contents = browser_->tab_strip_model()->GetActiveWebContents(); |
2489 if (!contents) | 2494 if (!contents) |
2490 return; | 2495 return; |
2491 if (DoCutCopyPasteForWebContents(contents, method)) | 2496 if (DoCutCopyPasteForWebContents(contents, method)) |
2492 return; | 2497 return; |
2493 | 2498 |
2494 WebContents* devtools = DevToolsWindow::GetInTabWebContents(contents, NULL); | 2499 WebContents* devtools = DevToolsWindow::GetInTabWebContents(contents, NULL); |
2495 if (devtools && DoCutCopyPasteForWebContents(devtools, method)) | 2500 if (devtools && DoCutCopyPasteForWebContents(devtools, method)) |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2544 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) { | 2549 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) { |
2545 gfx::Point icon_bottom( | 2550 gfx::Point icon_bottom( |
2546 toolbar_->location_bar()->GetLocationBarAnchorPoint()); | 2551 toolbar_->location_bar()->GetLocationBarAnchorPoint()); |
2547 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom); | 2552 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom); |
2548 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL)); | 2553 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL)); |
2549 ConvertPointToTarget(infobar_container_, this, &infobar_top); | 2554 ConvertPointToTarget(infobar_container_, this, &infobar_top); |
2550 top_arrow_height = infobar_top.y() - icon_bottom.y(); | 2555 top_arrow_height = infobar_top.y() - icon_bottom.y(); |
2551 } | 2556 } |
2552 return top_arrow_height; | 2557 return top_arrow_height; |
2553 } | 2558 } |
OLD | NEW |