OLD | NEW |
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/intents/web_intent_inline_disposition_delegate.h" | 5 #include "chrome/browser/ui/intents/web_intent_inline_disposition_delegate.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "chrome/browser/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
9 #include "chrome/browser/ui/browser_tabstrip.h" | 9 #include "chrome/browser/ui/browser_tabstrip.h" |
10 #include "chrome/browser/ui/intents/web_intent_picker.h" | 10 #include "chrome/browser/ui/intents/web_intent_picker.h" |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 | 82 |
83 bool WebIntentInlineDispositionDelegate::OnMessageReceived( | 83 bool WebIntentInlineDispositionDelegate::OnMessageReceived( |
84 const IPC::Message& message) { | 84 const IPC::Message& message) { |
85 bool handled = true; | 85 bool handled = true; |
86 IPC_BEGIN_MESSAGE_MAP(WebIntentInlineDispositionDelegate, message) | 86 IPC_BEGIN_MESSAGE_MAP(WebIntentInlineDispositionDelegate, message) |
87 IPC_MESSAGE_HANDLER(ExtensionHostMsg_Request, OnRequest) | 87 IPC_MESSAGE_HANDLER(ExtensionHostMsg_Request, OnRequest) |
88 IPC_MESSAGE_UNHANDLED(handled = false) | 88 IPC_MESSAGE_UNHANDLED(handled = false) |
89 IPC_END_MESSAGE_MAP() | 89 IPC_END_MESSAGE_MAP() |
90 return handled; | 90 return handled; |
91 } | 91 } |
| 92 |
92 void WebIntentInlineDispositionDelegate::RenderViewCreated( | 93 void WebIntentInlineDispositionDelegate::RenderViewCreated( |
93 content::RenderViewHost* render_view_host) { | 94 content::RenderViewHost* render_view_host) { |
94 DCHECK(render_view_host); | 95 DCHECK(render_view_host); |
95 render_view_host->EnableAutoResize( | 96 render_view_host->EnableAutoResize( |
96 picker_->GetMinInlineDispositionSize(), | 97 picker_->GetMinInlineDispositionSize(), |
97 picker_->GetMaxInlineDispositionSize()); | 98 picker_->GetMaxInlineDispositionSize()); |
98 render_view_host_ = render_view_host; | 99 render_view_host_ = render_view_host; |
99 } | 100 } |
100 | 101 |
101 void WebIntentInlineDispositionDelegate::DocumentAvailableInMainFrame() { | 102 void WebIntentInlineDispositionDelegate::DocumentAvailableInMainFrame() { |
(...skipping 21 matching lines...) Expand all Loading... |
123 content::WebContents* source, const gfx::Size& pref_size) { | 124 content::WebContents* source, const gfx::Size& pref_size) { |
124 DCHECK(picker_); | 125 DCHECK(picker_); |
125 picker_->OnInlineDispositionAutoResize(pref_size); | 126 picker_->OnInlineDispositionAutoResize(pref_size); |
126 } | 127 } |
127 | 128 |
128 void WebIntentInlineDispositionDelegate::HandleKeyboardEvent( | 129 void WebIntentInlineDispositionDelegate::HandleKeyboardEvent( |
129 content::WebContents* source, | 130 content::WebContents* source, |
130 const content::NativeWebKeyboardEvent& event) { | 131 const content::NativeWebKeyboardEvent& event) { |
131 picker_->OnInlineDispositionHandleKeyboardEvent(event); | 132 picker_->OnInlineDispositionHandleKeyboardEvent(event); |
132 } | 133 } |
OLD | NEW |