| 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 2468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2479 return chrome::kNTPBookmarkBarHeight - | 2479 return chrome::kNTPBookmarkBarHeight - |
| 2480 bookmark_bar_view_->GetFullyDetachedToolbarOverlap(); | 2480 bookmark_bar_view_->GetFullyDetachedToolbarOverlap(); |
| 2481 } | 2481 } |
| 2482 | 2482 |
| 2483 void BrowserView::ExecuteExtensionCommand( | 2483 void BrowserView::ExecuteExtensionCommand( |
| 2484 const extensions::Extension* extension, | 2484 const extensions::Extension* extension, |
| 2485 const extensions::Command& command) { | 2485 const extensions::Command& command) { |
| 2486 toolbar_->ExecuteExtensionCommand(extension, command); | 2486 toolbar_->ExecuteExtensionCommand(extension, command); |
| 2487 } | 2487 } |
| 2488 | 2488 |
| 2489 void BrowserView::ShowPageActionPopup( | |
| 2490 const extensions::Extension* extension) { | |
| 2491 toolbar_->ShowPageActionPopup(extension); | |
| 2492 } | |
| 2493 | |
| 2494 void BrowserView::ShowBrowserActionPopup( | |
| 2495 const extensions::Extension* extension) { | |
| 2496 toolbar_->ShowBrowserActionPopup(extension); | |
| 2497 } | |
| 2498 | |
| 2499 void BrowserView::DoCutCopyPaste(void (WebContents::*method)(), | 2489 void BrowserView::DoCutCopyPaste(void (WebContents::*method)(), |
| 2500 int command_id) { | 2490 int command_id) { |
| 2501 WebContents* contents = browser_->tab_strip_model()->GetActiveWebContents(); | 2491 WebContents* contents = browser_->tab_strip_model()->GetActiveWebContents(); |
| 2502 if (!contents) | 2492 if (!contents) |
| 2503 return; | 2493 return; |
| 2504 if (DoCutCopyPasteForWebContents(contents, method)) | 2494 if (DoCutCopyPasteForWebContents(contents, method)) |
| 2505 return; | 2495 return; |
| 2506 | 2496 |
| 2507 WebContents* devtools = DevToolsWindow::GetInTabWebContents(contents, NULL); | 2497 WebContents* devtools = DevToolsWindow::GetInTabWebContents(contents, NULL); |
| 2508 if (devtools && DoCutCopyPasteForWebContents(devtools, method)) | 2498 if (devtools && DoCutCopyPasteForWebContents(devtools, method)) |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2557 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) { | 2547 !GetLocationBar()->GetOmniboxView()->model()->popup_model()->IsOpen()) { |
| 2558 gfx::Point icon_bottom( | 2548 gfx::Point icon_bottom( |
| 2559 toolbar_->location_bar()->GetLocationBarAnchorPoint()); | 2549 toolbar_->location_bar()->GetLocationBarAnchorPoint()); |
| 2560 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom); | 2550 ConvertPointToTarget(toolbar_->location_bar(), this, &icon_bottom); |
| 2561 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL)); | 2551 gfx::Point infobar_top(0, infobar_container_->GetVerticalOverlap(NULL)); |
| 2562 ConvertPointToTarget(infobar_container_, this, &infobar_top); | 2552 ConvertPointToTarget(infobar_container_, this, &infobar_top); |
| 2563 top_arrow_height = infobar_top.y() - icon_bottom.y(); | 2553 top_arrow_height = infobar_top.y() - icon_bottom.y(); |
| 2564 } | 2554 } |
| 2565 return top_arrow_height; | 2555 return top_arrow_height; |
| 2566 } | 2556 } |
| OLD | NEW |