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