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 <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <memory> | 10 #include <memory> |
(...skipping 2520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2531 return this; | 2531 return this; |
2532 } | 2532 } |
2533 | 2533 |
2534 void BrowserView::ShowImeWarningBubble( | 2534 void BrowserView::ShowImeWarningBubble( |
2535 const extensions::Extension* extension, | 2535 const extensions::Extension* extension, |
2536 const base::Callback<void(ImeWarningBubblePermissionStatus status)>& | 2536 const base::Callback<void(ImeWarningBubblePermissionStatus status)>& |
2537 callback) { | 2537 callback) { |
2538 ImeWarningBubbleView::ShowBubble(extension, this, callback); | 2538 ImeWarningBubbleView::ShowBubble(extension, this, callback); |
2539 } | 2539 } |
2540 | 2540 |
| 2541 int BrowserView::GetRestoredWorkspace() const { |
| 2542 return frame_->GetRestoredWorkspace(); |
| 2543 } |
| 2544 |
2541 bool BrowserView::DoCutCopyPasteForWebContents( | 2545 bool BrowserView::DoCutCopyPasteForWebContents( |
2542 WebContents* contents, | 2546 WebContents* contents, |
2543 void (WebContents::*method)()) { | 2547 void (WebContents::*method)()) { |
2544 // It's possible for a non-null WebContents to have a null RWHV if it's | 2548 // It's possible for a non-null WebContents to have a null RWHV if it's |
2545 // crashed or otherwise been killed. | 2549 // crashed or otherwise been killed. |
2546 content::RenderWidgetHostView* rwhv = contents->GetRenderWidgetHostView(); | 2550 content::RenderWidgetHostView* rwhv = contents->GetRenderWidgetHostView(); |
2547 if (!rwhv || !rwhv->HasFocus()) | 2551 if (!rwhv || !rwhv->HasFocus()) |
2548 return false; | 2552 return false; |
2549 // Calling |method| rather than using a fake key event is important since a | 2553 // Calling |method| rather than using a fake key event is important since a |
2550 // fake event might be consumed by the web content. | 2554 // fake event might be consumed by the web content. |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2646 } | 2650 } |
2647 | 2651 |
2648 extensions::ActiveTabPermissionGranter* | 2652 extensions::ActiveTabPermissionGranter* |
2649 BrowserView::GetActiveTabPermissionGranter() { | 2653 BrowserView::GetActiveTabPermissionGranter() { |
2650 content::WebContents* web_contents = GetActiveWebContents(); | 2654 content::WebContents* web_contents = GetActiveWebContents(); |
2651 if (!web_contents) | 2655 if (!web_contents) |
2652 return nullptr; | 2656 return nullptr; |
2653 return extensions::TabHelper::FromWebContents(web_contents) | 2657 return extensions::TabHelper::FromWebContents(web_contents) |
2654 ->active_tab_permission_granter(); | 2658 ->active_tab_permission_granter(); |
2655 } | 2659 } |
OLD | NEW |